Jump to content

Module:Political party/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gonnym (talk | contribs) at 09:34, 19 November 2021. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Unit tests for [[Module:Political party]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_01_bad_values()
	self:preprocess_equals_sandbox_many('{{#invoke:Political party', 'fetch', {
		{'Aaaaaaaaaaa|color', 'Aaaaaaaaaaa'},
		{'Aaaaaaaaaaa|shortname', 'Aaaaaaaaaaa'},
		{'aontú|color', ''},
    }, {nowiki=1})
end

function p:test_02_fallback_values()
	self:preprocess_equals_sandbox_many('{{#invoke:Political party', 'fetch', {		
		{'Aontú|shortname', 'Aon'},
		{'Actual Equality|shortname', 'Actual Equality'},
		{'Actual Equality|abbr', 'Actual Equality'},
    }, {nowiki=1})
end

return p