Jump to content

Module:Road data/size/testcases

From Wikipedia, the free encyclopedia
-- Unit tests for [[Module:Road data/size]]. Click talk page to run tests.
local p = require('Module:UnitTests')
local sandbox = require('Module:Road data/size/sandbox')

function p:test_size_wikitext()
	self:preprocess_equals('{{#invoke:Road data/size/sandbox|size|style=jct}}', '24px')
end

function p:test_size_lua()
	self:equals('Basic call', sandbox._size{style='infobox'}, '72px')
end

function p:test_ignoreUpright_lua()
	self:equals('Do ignore', sandbox._ignoreUpright('rdt'), true)
	self:equals('Do not ignore', sandbox._ignoreUpright('infobox'), false)
end

return p