Module:Political party/testcases: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
function p:test_02_fallback_values() |
function p:test_02_fallback_values() |
||
self:preprocess_equals_sandbox_many('{{#invoke:Political party', 'fetch', { |
self:preprocess_equals_sandbox_many('{{#invoke:Political party', 'fetch', { |
||
{'A test no values|color', ''}, |
{'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'}, |
||
{'Actual Equality|shortname', 'Actual Equality'}, |
{'Actual Equality|shortname', 'Actual Equality'}, |
Revision as of 09:26, 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'},
{'Actual Equality|shortname', 'Actual Equality'},
{'Actual Equality|abbrev', 'Actual Equality'},
}, {nowiki=1})
end
return p