Module:Political party/testcases: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
{'A test no values|color', '<strong class="error">Value not in template. Please request that it be added.</strong>'}, |
{'A test no values|color', '<strong class="error">Value not in template. Please request that it be added.</strong>'}, |
||
{'Aontú|shortname', 'Aon'}, |
{'Aontú|shortname', 'Aon'}, |
||
{'[[Aontú]]|shortname', 'Aon'}, |
|||
{'[[Aontú|Aontú2]]|shortname', 'Aon'}, |
|||
{'Actual Equality|shortname', 'Actual Equality'}, |
{'Actual Equality|shortname', 'Actual Equality'}, |
||
{'Actual Equality|abbrev', 'Actual Equality'}, |
{'Actual Equality|abbrev', 'Actual Equality'}, |
Revision as of 09:28, 26 November 2021
![]() | This is the test cases page for the module Module:Political party. Results of the test cases. |
-- 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', '#F8F9FA'},
{'Aaaaaaaaaaa|shortname', 'Aaaaaaaaaaa'},
{'aontú|color', '#F8F9FA'},
}, {nowiki=1})
end
function p:test_02_fallback_values()
self:preprocess_equals_sandbox_many('{{#invoke:Political party', 'fetch', {
{'A test no values|color', '<strong class="error">Value not in template. Please request that it be added.</strong>'},
{'Aontú|shortname', 'Aon'},
{'[[Aontú]]|shortname', 'Aon'},
{'[[Aontú|Aontú2]]|shortname', 'Aon'},
{'Actual Equality|shortname', 'Actual Equality'},
{'Actual Equality|abbrev', 'Actual Equality'},
}, {nowiki=1})
end
return p