Content deleted Content added
replace d.timestamp with d.temp - not clear yet where timestamp processing will take place in the module |
add renderPadlock test |
||
Line 942:
self:assertCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 0, nil, nil)
end
return suite▼
-- Categories changed from the old template behaviour:
Line 951 ⟶ 949:
-- were both moved from 'Wikipedia move-protected pages' to 'Wikipedia move-protected templates'
-- 4. move_full_template_all_all was 'Wikipedia move-protected pages', changed to 'Wikipedia move-protected templates'
--------------------------------------------------------------------------------
-- Render tests
--------------------------------------------------------------------------------
function suite:testRenderPadlock()
local expected = '<div class="metadata topicon nopopups" id="protected-icon" style="display:none;right:40px;">'
.. '[[Image:foo.png|20px|link=[[bar]]|This is icon text|alt=This is alt text]]'
.. '</div>'
local actual = pp.renderPadlock{
right = "40px",
image = "foo.png",
iconLink = '[[bar]]',
iconText = 'This is icon text',
altText = 'This is alt text'
}
self:assertEquals(expected, actual)
end
▲return suite
|