Module:Reply to/testcases
Appearance
![]() | This is the test cases page for the module Module:Reply to. Results of the test cases. |
local mReplyTo = require('Module:Reply to') -- the module to be tested
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()
local frame = mw.getCurrentFrame()
local function makeFrameWithParentArgs(args)
local parent = frame:newChild{title = 'Template:Reply to', args = args}
local child = parent:newChild{title = 'Module:Reply to'}
return child
end
local function replyTo(args)
return mReplyTo.replyto(makeFrameWithParentArgs(args))
end
--------------------------------------------------------------------------------
-- Error tests
--------------------------------------------------------------------------------
function suite:testNoUsernamesError()
self:assertEquals('<strong class="error">Error in [[Template:Reply to]]: Username not given.</strong>', replyTo{})
end
return suite