mirror of
https://github.com/koreader/koreader
synced 2024-11-18 03:25:46 +00:00
21 lines
559 B
Lua
21 lines
559 B
Lua
|
require("commonrequire")
|
||
|
local ImageWidget = require("ui/widget/imagewidget")
|
||
|
|
||
|
describe("ImageWidget module", function()
|
||
|
it("should render without error", function()
|
||
|
local imgw = ImageWidget:new{
|
||
|
file = "resources/icons/appbar.chevron.up.png"
|
||
|
}
|
||
|
imgw:_render()
|
||
|
assert(imgw._bb)
|
||
|
end)
|
||
|
it("should error out on none exist image", function()
|
||
|
local imgw = ImageWidget:new{
|
||
|
file = "wtf.png"
|
||
|
}
|
||
|
assert.has_error(function()
|
||
|
imgw:_render()
|
||
|
end)
|
||
|
end)
|
||
|
end)
|