Content deleted Content added
Fred Gandt (talk | contribs) use non sandbox version of Module:UnitTests |
Fred Gandt (talk | contribs) tests for multiple short description templates |
||
Line 7:
function p:test__no_name_param()
self:preprocess_equals('{{#invoke:GetShortDescription|main}}', '<strong class="error">ERROR with invocation of [[Module:GetShortDescription]]: a page name (including namespace) MUST be provided.</strong>', {combined = 1})
end
function p:test__no_name_value()
self:preprocess_equals('{{#invoke:GetShortDescription|main|name=}}', '<strong class="error">ERROR with invocation of [[Module:GetShortDescription]]: a page name (including namespace) MUST be provided.</strong>', {combined = 1})
end
Line 46:
end
--[[
function p:test__two_short_descriptions_numbered_after()
Line 58:
function p:test__two_short_description_templates()
self:preprocess_equals('{{#invoke:GetShortDescription|main|name=User:Fred Gandt/sandbox/two explicit short description templates}}', "Explicit short description one")
end
function p:test__two_short_description_templates__first_noreplace()
self:preprocess_equals('{{#invoke:GetShortDescription|main|name=User:Fred Gandt/sandbox/two explicit short description templates first noreplace}}', "Explicit short description not replaced")
end
function p:test__two_short_description_templates__second_noreplace()
self:preprocess_equals('{{#invoke:GetShortDescription|main|name=User:Fred Gandt/sandbox/two explicit short description templates second noreplace}}', "Explicit short description not replaced")
end
function p:test__three_short_description_templates__second_noreplace()
self:preprocess_equals('{{#invoke:GetShortDescription|main|name=User:Fred Gandt/sandbox/three explicit short description templates second noreplace}}', "Explicit short description used")
end
|