tests: Test screen.automatic_factory

This commit is contained in:
Emmanuel Lepage Vallee 2019-06-15 02:22:03 -04:00
parent 553cafccde
commit 68488f6218
1 changed files with 11 additions and 0 deletions

View File

@ -80,6 +80,17 @@ local steps = {
assert(called) assert(called)
return true
end,
-- Test the `automatic_factory` getter and setter.
function()
assert(type(screen.automatic_factory) == "boolean")
local orig = screen.automatic_factory
screen.automatic_factory = not orig
assert(screen.automatic_factory ~= orig)
assert(type(screen.automatic_factory) == "boolean")
screen.automatic_factory = not screen.automatic_factory
assert(screen.automatic_factory == orig)
return true return true
end end
} }