Module:Mock title/testcases
Appearance
![]() | This is the test cases page for the module Module:Mock title. Results of the test cases. |
local mMockTitle = require("Module:Mock title")
local ScribuntoUnit = require("Module:ScribuntoUnit")
local suite = ScribuntoUnit:new()
--------------------------------------------------------------------------------
-- MockTitle tests
--------------------------------------------------------------------------------
local pageNames = {
"Example",
"fr:Example",
"Module:Sandbox",
"Module:Sandbox/subpage",
"mw:Test",
"fr:b:Example",
}
for _, pageName in ipairs(pageNames) do
suite[string.format('test MockTitle: when using page name "%s", the prefixedText property equals the page name', pageName)] = function (self)
self:assertEquals("Example", mMockTitle.MockTitle({page = "Example"}).prefixedText)
end
end
return suite