Module:Protection banner/config/testcases: Difference between revisions

Content deleted Content added
fix module name
get the category test cases working again
Line 4:
local ScribuntoUnit = require('Module:ScribuntoUnit')
local suite = ScribuntoUnit:new()
 
-- Get the classes
local Protection = pp._exportClasses().Protection
local Blurb = pp._exportClasses().Blurb
local BannerTemplate = pp._exportClasses().BannerTemplate
local Banner = pp._exportClasses().Banner
local Padlock = pp._exportClasses().Padlock
 
-- Get the config
local mainCfg = require('Module:Protection banner/config')
 
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
 
function suite.makeFakeProtectionObj(fields, cfg, title)
local obj = Protection:new({}, cfg, title)
for k, v in pairs(fields) do
obj[k] = v
end
return obj
end
 
function suite.escapePattern(s)
Line 14 ⟶ 32:
end
 
function suite:assertCategoryEqualsassertProtectionCategoryEquals(expected, protTypeaction, protLevellevel, namespace, reason, expiry)
local actualfakeTitleObj = pp.getCategoryName(nil,{namespace protType, protLevel,= namespace, reason, expiry)}
local protectionObj = suite.makeFakeProtectionObj(
{
action = action,
level = level,
title = fakeTitleObj,
reason = reason,
expiry = expiry
},
mainCfg
)
local actual = protectionObj:makeProtectionCategory()
expected = string.format('[[Category:%s]]', expected)
self:assertEquals(expected, actual)
end
Line 26 ⟶ 56:
d.edit = 'edit'
d.move = 'move'
d.pc = 'pcautoreview'
d.semi = 'autoconfirmed'
d.template = 'templatetemplateeditor'
d.full = 'sysop'
d.dispute = 'dispute'
Line 37 ⟶ 67:
d.sock = 'sock'
d.office = 'office'
d.temp = 'temp'3000000000
d.indef = 'indef'
 
Line 49 ⟶ 79:
 
function suite:testCategory_edit_semi_main_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected due to dispute', d.edit, d.semi, 0, d.dispute, nil)
end
 
function suite:testCategory_edit_semi_talk_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected due to dispute', d.edit, d.semi, 1, d.dispute, nil)
end
 
function suite:testCategory_edit_semi_file_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected due to dispute', d.edit, d.semi, 6, d.dispute, nil)
end
 
function suite:testCategory_edit_semi_template_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected due to dispute', d.edit, d.semi, 10, d.dispute, nil)
end
 
function suite:testCategory_edit_semi_main_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected due to dispute', d.edit, d.semi, 0, d.dispute, d.temp)
end
 
function suite:testCategory_edit_semi_talk_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected due to dispute', d.edit, d.semi, 1, d.dispute, d.temp)
end
 
function suite:testCategory_edit_semi_file_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected due to dispute', d.edit, d.semi, 6, d.dispute, d.temp)
end
 
function suite:testCategory_edit_semi_template_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected due to dispute', d.edit, d.semi, 10, d.dispute, d.temp)
end
 
Line 85 ⟶ 115:
 
function suite:testCategory_edit_full_main_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected due to dispute', d.edit, d.full, 0, d.dispute, nil)
end
 
function suite:testCategory_edit_full_talk_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected due to dispute', d.edit, d.full, 1, d.dispute, nil)
end
 
function suite:testCategory_edit_full_file_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected due to dispute', d.edit, d.full, 6, d.dispute, nil)
end
 
function suite:testCategory_edit_full_template_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected due to dispute', d.edit, d.full, 10, d.dispute, nil)
end
 
function suite:testCategory_edit_full_main_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected due to dispute', d.edit, d.full, 0, d.dispute, d.temp)
end
 
function suite:testCategory_edit_full_talk_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected due to dispute', d.edit, d.full, 1, d.dispute, d.temp)
end
 
function suite:testCategory_edit_full_file_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected due to dispute', d.edit, d.full, 6, d.dispute, d.temp)
end
 
function suite:testCategory_edit_full_template_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected due to dispute', d.edit, d.full, 10, d.dispute, d.temp)
end
 
Line 121 ⟶ 151:
 
function suite:testCategory_move_full_template_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to dispute', d.move, d.full, 0, d.dispute, nil)
end
 
function suite:testCategory_move_full_talk_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to dispute', d.move, d.full, 1, d.dispute, nil)
end
 
function suite:testCategory_move_full_file_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to dispute', d.move, d.full, 6, d.dispute, nil)
end
 
function suite:testCategory_move_full_template_dispute_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to dispute', d.move, d.full, 10, d.dispute, nil)
end
 
function suite:testCategory_move_full_main_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to dispute', d.move, d.full, 0, d.dispute, d.temp)
end
 
function suite:testCategory_move_full_talk_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to dispute', d.move, d.full, 1, d.dispute, d.temp)
end
 
function suite:testCategory_move_full_file_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to dispute', d.move, d.full, 6, d.dispute, d.temp)
end
 
function suite:testCategory_move_full_template_dispute_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to dispute', d.move, d.full, 10, d.dispute, d.temp)
end
 
Line 157 ⟶ 187:
 
function suite:testCategory_edit_semi_user_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 2, d.vand, nil)
end
 
function suite:testCategory_edit_semi_usertalk_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 3, d.vand, nil)
end
 
function suite:testCategory_edit_semi_file_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected images', d.edit, d.semi, 6, d.vand, nil)
end
 
function suite:testCategory_edit_semi_wikipedia_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected project pages', d.edit, d.semi, 4, d.vand, nil)
end
 
function suite:testCategory_edit_semi_help_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected project pages', d.edit, d.semi, 12, d.vand, nil)
end
 
function suite:testCategory_edit_semi_portal_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected portals', d.edit, d.semi, 100, d.vand, nil)
end
 
function suite:testCategory_edit_semi_template_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected templates', d.edit, d.semi, 10, d.vand, nil)
end
 
function suite:testCategory_edit_semi_talk_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected talk pages', d.edit, d.semi, 1, d.vand, nil)
end
 
function suite:testCategory_edit_semi_main_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected against vandalism', d.edit, d.semi, 0, d.vand, nil)
end
 
function suite:testCategory_edit_semi_user_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 2, d.vand, d.temp)
end
 
function suite:testCategory_edit_semi_usertalk_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 3, d.vand, d.temp)
end
 
function suite:testCategory_edit_semi_file_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected images', d.edit, d.semi, 6, d.vand, d.temp)
end
 
function suite:testCategory_edit_semi_wikipedia_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected project pages', d.edit, d.semi, 4, d.vand, d.temp)
end
 
function suite:testCategory_edit_semi_help_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected project pages', d.edit, d.semi, 12, d.vand, d.temp)
end
 
function suite:testCategory_edit_semi_portal_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected portals', d.edit, d.semi, 100, d.vand, d.temp)
end
 
function suite:testCategory_edit_semi_template_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected templates', d.edit, d.semi, 10, d.vand, d.temp)
end
 
function suite:testCategory_edit_semi_talk_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected talk pages', d.edit, d.semi, 1, d.vand, d.temp)
end
 
function suite:testCategory_edit_semi_main_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected against vandalism', d.edit, d.semi, 0, d.vand, d.temp)
end
 
Line 233 ⟶ 263:
 
function suite:testCategory_edit_full_user_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 2, d.vand, nil)
end
 
function suite:testCategory_edit_full_usertalk_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 3, d.vand, nil)
end
 
function suite:testCategory_edit_full_file_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected images', d.edit, d.full, 6, d.vand, nil)
end
 
function suite:testCategory_edit_full_wikipedia_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected project pages', d.edit, d.full, 4, d.vand, nil)
end
 
function suite:testCategory_edit_full_help_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected project pages', d.edit, d.full, 12, d.vand, nil)
end
 
function suite:testCategory_edit_full_portal_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected against vandalism', d.edit, d.full, 100, d.vand, nil)
end
 
function suite:testCategory_edit_full_template_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected templates', d.edit, d.full, 10, d.vand, nil)
end
 
function suite:testCategory_edit_full_talk_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected talk pages', d.edit, d.full, 1, d.vand, nil)
end
 
function suite:testCategory_edit_full_main_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected against vandalism', d.edit, d.full, 0, d.vand, nil)
end
 
function suite:testCategory_edit_full_user_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 2, d.vand, d.temp)
end
 
function suite:testCategory_edit_full_usertalk_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 3, d.vand, d.temp)
end
 
function suite:testCategory_edit_full_file_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected images', d.edit, d.full, 6, d.vand, d.temp)
end
 
function suite:testCategory_edit_full_wikipedia_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected project pages', d.edit, d.full, 4, d.vand, d.temp)
end
 
function suite:testCategory_edit_full_help_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected project pages', d.edit, d.full, 12, d.vand, d.temp)
end
 
function suite:testCategory_edit_full_portal_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected against vandalism', d.edit, d.full, 100, d.vand, d.temp)
end
 
function suite:testCategory_edit_full_template_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected templates', d.edit, d.full, 10, d.vand, d.temp)
end
 
function suite:testCategory_edit_full_talk_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected talk pages', d.edit, d.full, 1, d.vand, d.temp)
end
 
function suite:testCategory_edit_full_main_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected against vandalism', d.edit, d.full, 0, d.vand, d.temp)
end
 
Line 309 ⟶ 339:
 
function suite:testCategory_move_full_user_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected user and user talk pages', d.move, d.full, 2, d.vand, nil)
end
 
function suite:testCategory_move_full_usertalk_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected user and user talk pages', d.move, d.full, 3, d.vand, nil)
end
 
function suite:testCategory_move_full_file_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to vandalism', d.move, d.full, 6, d.vand, nil)
end
 
function suite:testCategory_move_full_wikipedia_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected project pages', d.move, d.full, 4, d.vand, nil)
end
 
function suite:testCategory_move_full_help_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected project pages', d.move, d.full, 12, d.vand, nil)
end
 
function suite:testCategory_move_full_portal_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected portals', d.move, d.full, 100, d.vand, nil)
end
 
function suite:testCategory_move_full_template_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected templates', d.move, d.full, 10, d.vand, nil)
end
 
function suite:testCategory_move_full_talk_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected talk pages', d.move, d.full, 1, d.vand, nil)
end
 
function suite:testCategory_move_full_main_vandalism_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to vandalism', d.move, d.full, 0, d.vand, nil)
end
 
function suite:testCategory_move_full_user_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected user and user talk pages', d.move, d.full, 2, d.vand, d.temp)
end
 
function suite:testCategory_move_full_usertalk_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected user and user talk pages', d.move, d.full, 3, d.vand, d.temp)
end
 
function suite:testCategory_move_full_file_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to vandalism', d.move, d.full, 6, d.vand, d.temp)
end
 
function suite:testCategory_move_full_wikipedia_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected project pages', d.move, d.full, 4, d.vand, d.temp)
end
 
function suite:testCategory_move_full_help_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected project pages', d.move, d.full, 12, d.vand, d.temp)
end
 
function suite:testCategory_move_full_portal_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected portals', d.move, d.full, 100, d.vand, d.temp)
end
 
function suite:testCategory_move_full_template_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected templates', d.move, d.full, 10, d.vand, d.temp)
end
 
function suite:testCategory_move_full_talk_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected talk pages', d.move, d.full, 1, d.vand, d.temp)
end
 
function suite:testCategory_move_full_main_vandalism_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages move-protected due to vandalism', d.move, d.full, 0, d.vand, d.temp)
end
 
Line 385 ⟶ 415:
 
function suite:testCategory_edit_semi_template_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected templates', d.edit, d.semi, 10, d.indef, nil)
end
 
function suite:testCategory_edit_semi_template_all_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected templates', d.edit, d.semi, 10, nil, d.temp)
end
 
function suite:testCategory_edit_full_template_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected templates', d.edit, d.full, 10, nil, nil)
end
 
function suite:testCategory_edit_full_template_all_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected templates', d.edit, d.full, 10, nil, d.temp)
end
 
function suite:testCategory_edit_template_template_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected templates', d.edit, d.template, 10, nil, nil)
end
 
function suite:testCategory_edit_template_template_all_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected templates', d.edit, d.template, 10, nil, d.temp)
end
 
function suite:testCategory_move_full_template_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected templates', d.move, d.full, 10, nil, nil)
end
 
function suite:testCategory_edit_full_template_all_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected templates', d.move, d.full, 10, nil, d.temp)
end
 
Line 421 ⟶ 451:
 
function suite:testCategory_edit_semi_user_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 2, nil, nil)
end
 
function suite:testCategory_edit_semi_usertalk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 3, nil, nil)
end
 
function suite:testCategory_edit_full_user_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 2, nil, nil)
end
 
function suite:testCategory_edit_full_usertalk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 3, nil, nil)
end
 
function suite:testCategory_edit_semi_user_all_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 2, nil, d.temp)
end
 
function suite:testCategory_edit_semi_usertalk_all_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 3, nil, d.temp)
end
 
function suite:testCategory_edit_full_user_all_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 2, nil, d.temp)
end
 
function suite:testCategory_edit_full_usertalk_all_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 3, nil, d.temp)
end
 
Line 457 ⟶ 487:
 
function suite:testCategory_edit_semi_main_sock_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected from banned users', d.edit, d.semi, 0, d.sock, nil)
end
 
function suite:testCategory_edit_semi_talk_sock_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected from banned users', d.edit, d.semi, 1, d.sock, nil)
end
 
function suite:testCategory_edit_semi_file_sock_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected from banned users', d.edit, d.semi, 6, d.sock, nil)
end
 
function suite:testCategory_edit_semi_template_sock_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected from banned users', d.edit, d.semi, 10, d.sock, nil)
end
 
function suite:testCategory_edit_semi_main_sock_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected from banned users', d.edit, d.semi, 0, d.sock, d.temp)
end
 
function suite:testCategory_edit_semi_talk_sock_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected from banned users', d.edit, d.semi, 1, d.sock, d.temp)
end
 
function suite:testCategory_edit_semi_file_sock_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected from banned users', d.edit, d.semi, 6, d.sock, d.temp)
end
 
function suite:testCategory_edit_semi_template_sock_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages semi-protected from banned users', d.edit, d.semi, 10, d.sock, d.temp)
end
 
function suite:testCategory_edit_full_main_sock_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected from banned users', d.edit, d.full, 0, d.sock, nil)
end
 
function suite:testCategory_edit_full_talk_sock_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected from banned users', d.edit, d.full, 1, d.sock, nil)
end
 
function suite:testCategory_edit_full_file_sock_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected from banned users', d.edit, d.full, 6, d.sock, nil)
end
 
function suite:testCategory_edit_full_template_sock_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected from banned users', d.edit, d.full, 10, d.sock, nil)
end
 
function suite:testCategory_edit_full_main_sock_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected from banned users', d.edit, d.full, 0, d.sock, d.temp)
end
 
function suite:testCategory_edit_full_talk_sock_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected from banned users', d.edit, d.full, 1, d.sock, d.temp)
end
 
function suite:testCategory_edit_full_file_sock_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected from banned users', d.edit, d.full, 6, d.sock, d.temp)
end
 
function suite:testCategory_edit_full_template_sock_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pages protected from banned users', d.edit, d.full, 10, d.sock, d.temp)
end
 
Line 525 ⟶ 555:
 
function suite:testCategory_edit_semi_main_blp_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', d.edit, d.semi, 0, d.blp, d.indef)
end
 
function suite:testCategory_edit_semi_talk_blp_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', d.edit, d.semi, 1, d.blp, d.indef)
end
 
function suite:testCategory_edit_semi_file_blp_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', d.edit, d.semi, 6, d.blp, d.indef)
end
 
function suite:testCategory_edit_semi_template_blp_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', d.edit, d.semi, 10, d.blp, d.indef)
end
 
function suite:testCategory_edit_semi_main_blp_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', d.edit, d.semi, 0, d.blp, nil)
end
 
function suite:testCategory_edit_semi_talk_blp_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', d.edit, d.semi, 1, d.blp, nil)
end
 
function suite:testCategory_edit_semi_file_blp_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', d.edit, d.semi, 6, d.blp, nil)
end
 
function suite:testCategory_edit_semi_template_blp_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', d.edit, d.semi, 10, d.blp, nil)
end
 
function suite:testCategory_edit_semi_main_blp_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia temporarily semi-protected biographies of living people', d.edit, d.semi, 0, d.blp, d.temp)
end
 
function suite:testCategory_edit_semi_talk_blp_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia temporarily semi-protected biographies of living people', d.edit, d.semi, 1, d.blp, d.temp)
end
 
function suite:testCategory_edit_semi_file_blp_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia temporarily semi-protected biographies of living people', d.edit, d.semi, 6, d.blp, d.temp)
end
 
function suite:testCategory_edit_semi_template_blp_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia temporarily semi-protected biographies of living people', d.edit, d.semi, 10, d.blp, d.temp)
end
 
function suite:testCategory_edit_full_main_blp_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely protected biographies of living people', d.edit, d.full, 0, d.blp, d.indef)
end
 
function suite:testCategory_edit_full_talk_blp_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely protected biographies of living people', d.edit, d.full, 1, d.blp, d.indef)
end
 
function suite:testCategory_edit_full_file_blp_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely protected biographies of living people', d.edit, d.full, 6, d.blp, d.indef)
end
 
function suite:testCategory_edit_full_template_blp_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely protected biographies of living people', d.edit, d.full, 10, d.blp, d.indef)
end
 
function suite:testCategory_edit_full_main_blp_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely protected biographies of living people', d.edit, d.full, 0, d.blp, nil)
end
 
function suite:testCategory_edit_full_talk_blp_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely protected biographies of living people', d.edit, d.full, 1, d.blp, nil)
end
 
function suite:testCategory_edit_full_file_blp_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely protected biographies of living people', d.edit, d.full, 6, d.blp, nil)
end
 
function suite:testCategory_edit_full_template_blp_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely protected biographies of living people', d.edit, d.full, 10, d.blp, nil)
end
 
function suite:testCategory_edit_full_main_blp_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia temporarily protected biographies of living people', d.edit, d.full, 0, d.blp, d.temp)
end
 
function suite:testCategory_edit_full_talk_blp_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia temporarily protected biographies of living people', d.edit, d.full, 1, d.blp, d.temp)
end
 
function suite:testCategory_edit_full_file_blp_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia temporarily protected biographies of living people', d.edit, d.full, 6, d.blp, d.temp)
end
 
function suite:testCategory_edit_full_template_blp_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia temporarily protected biographies of living people', d.edit, d.full, 10, d.blp, d.temp)
end
 
Line 625 ⟶ 655:
 
function suite:testCategory_edit_semi_user_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 2, nil, d.indef)
end
 
function suite:testCategory_edit_semi_usertalk_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 3, nil, d.indef)
end
 
function suite:testCategory_edit_semi_file_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected images', d.edit, d.semi, 6, nil, d.indef)
end
 
function suite:testCategory_edit_semi_wikipedia_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected project pages', d.edit, d.semi, 4, nil, d.indef)
end
 
function suite:testCategory_edit_semi_help_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected project pages', d.edit, d.semi, 12, nil, d.indef)
end
 
function suite:testCategory_edit_semi_portal_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected portals', d.edit, d.semi, 100, nil, d.indef)
end
 
function suite:testCategory_edit_semi_template_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected templates', d.edit, d.semi, 10, nil, d.indef)
end
 
function suite:testCategory_edit_semi_talk_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected talk pages', d.edit, d.semi, 1, nil, d.indef)
end
 
function suite:testCategory_edit_semi_main_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely semi-protected pages', d.edit, d.semi, 0, nil, d.indef)
end
 
Line 665 ⟶ 695:
 
function suite:testCategory_move_full_user_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected user and user talk pages', d.move, d.full, 2, nil, d.indef)
end
 
function suite:testCategory_move_full_usertalk_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected user and user talk pages', d.move, d.full, 3, nil, d.indef)
end
 
function suite:testCategory_move_full_file_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely move-protected pages', d.move, d.full, 6, nil, d.indef)
end
 
function suite:testCategory_move_full_wikipedia_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected project pages', d.move, d.full, 4, nil, d.indef)
end
 
function suite:testCategory_move_full_help_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected project pages', d.move, d.full, 12, nil, d.indef)
end
 
function suite:testCategory_move_full_portal_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected portals', d.move, d.full, 100, nil, d.indef)
end
 
function suite:testCategory_move_full_template_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected templates', d.move, d.full, 10, nil, d.indef)
end
 
function suite:testCategory_move_full_talk_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected talk pages', d.move, d.full, 1, nil, d.indef)
end
 
function suite:testCategory_move_full_main_all_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia indefinitely move-protected pages', d.move, d.full, 0, nil, d.indef)
end
 
Line 705 ⟶ 735:
 
function suite:testCategory_edit_semi_user_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 2, nil, nil)
end
 
function suite:testCategory_edit_semi_usertalk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected user and user talk pages', d.edit, d.semi, 3, nil, nil)
end
 
function suite:testCategory_edit_semi_file_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected images', d.edit, d.semi, 6, nil, nil)
end
 
function suite:testCategory_edit_semi_wikipedia_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected project pages', d.edit, d.semi, 4, nil, nil)
end
 
function suite:testCategory_edit_semi_help_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected project pages', d.edit, d.semi, 12, nil, nil)
end
 
function suite:testCategory_edit_semi_portal_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected portals', d.edit, d.semi, 100, nil, nil)
end
 
function suite:testCategory_edit_semi_template_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected templates', d.edit, d.semi, 10, nil, nil)
end
 
function suite:testCategory_edit_semi_category_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected categories', d.edit, d.semi, 14, nil, nil)
end
 
function suite:testCategory_edit_semi_talk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Semi-protected talk pages', d.edit, d.semi, 1, nil, nil)
end
 
function suite:testCategory_edit_semi_main_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia semi-protected pages', d.edit, d.semi, 0, nil, nil)
end
 
function suite:testCategory_edit_full_user_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 2, nil, nil)
end
 
function suite:testCategory_edit_full_usertalk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected user and user talk pages', d.edit, d.full, 3, nil, nil)
end
 
function suite:testCategory_edit_full_file_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected images', d.edit, d.full, 6, nil, nil)
end
 
function suite:testCategory_edit_full_wikipedia_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected project pages', d.edit, d.full, 4, nil, nil)
end
 
function suite:testCategory_edit_full_help_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected project pages', d.edit, d.full, 12, nil, nil)
end
 
function suite:testCategory_edit_full_portal_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected pages', d.edit, d.full, 100, nil, nil)
end
 
function suite:testCategory_edit_full_template_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected templates', d.edit, d.full, 10, nil, nil)
end
 
function suite:testCategory_edit_full_category_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected categories', d.edit, d.full, 14, nil, nil)
end
 
function suite:testCategory_edit_full_talk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Protected talk pages', d.edit, d.full, 1, nil, nil)
end
 
function suite:testCategory_edit_full_main_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia protected pages', d.edit, d.full, 0, nil, nil)
end
 
Line 789 ⟶ 819:
 
function suite:testCategory_move_full_user_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected user and user talk pages', d.move, d.full, 2, nil, nil)
end
 
function suite:testCategory_move_full_usertalk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected user and user talk pages', d.move, d.full, 3, nil, nil)
end
 
function suite:testCategory_move_full_file_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected pages', d.move, d.full, 6, nil, nil)
end
 
function suite:testCategory_move_full_wikipedia_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected project pages', d.move, d.full, 4, nil, nil)
end
 
function suite:testCategory_move_full_help_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected project pages', d.move, d.full, 12, nil, nil)
end
 
function suite:testCategory_move_full_portal_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected portals', d.move, d.full, 100, nil, nil)
end
 
function suite:testCategory_move_full_template_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected templates', d.move, d.full, 10, nil, nil)
end
 
function suite:testCategory_move_full_category_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected pages', d.move, d.full, 14, nil, nil)
end
 
function suite:testCategory_move_full_talk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected talk pages', d.move, d.full, 1, nil, nil)
end
 
function suite:testCategory_move_full_main_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia move-protected pages', d.move, d.full, 0, nil, nil)
end
 
Line 833 ⟶ 863:
 
function suite:testCategory_edit_full_main_office_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia Office-protected pages', d.edit, d.full, 0, d.office, nil)
end
 
function suite:testCategory_edit_full_talk_office_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia Office-protected pages', d.edit, d.full, 1, d.office, nil)
end
 
function suite:testCategory_edit_full_template_office_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia Office-protected pages', d.edit, d.full, 10, d.office, nil)
end
 
function suite:testCategory_edit_full_category_office_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia Office-protected pages', d.edit, d.full, 14, d.office, nil)
end
 
function suite:testCategory_edit_full_user_office_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia Office-protected pages', d.edit, d.full, 2, d.office, nil)
end
 
function suite:testCategory_edit_full_user_office_temp()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia Office-protected pages', d.edit, d.full, 2, d.office, d.temp)
end
 
function suite:testCategory_edit_full_user_office_indef()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia Office-protected pages', d.edit, d.full, 2, d.office, d.indef)
end
 
Line 865 ⟶ 895:
 
function suite:testCategory_pc_pc1_user_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 2, nil, nil)
end
 
function suite:testCategory_pc_pc1_usertalk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 3, nil, nil)
end
 
function suite:testCategory_pc_pc1_file_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 6, nil, nil)
end
 
function suite:testCategory_pc_pc1_wikipedia_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 4, nil, nil)
end
 
function suite:testCategory_pc_pc1_help_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 12, nil, nil)
end
 
function suite:testCategory_pc_pc1_portal_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 100, nil, nil)
end
 
function suite:testCategory_pc_pc1_template_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 10, nil, nil)
end
 
function suite:testCategory_pc_pc1_category_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 14, nil, nil)
end
 
function suite:testCategory_pc_pc1_talk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 1, nil, nil)
end
 
function suite:testCategory_pc_pc1_main_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 1)', d.pc, d.pc1, 0, nil, nil)
end
 
Line 909 ⟶ 939:
 
function suite:testCategory_pc_pc2_user_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 2, nil, nil)
end
 
function suite:testCategory_pc_pc2_usertalk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 3, nil, nil)
end
 
function suite:testCategory_pc_pc2_file_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 6, nil, nil)
end
 
function suite:testCategory_pc_pc2_wikipedia_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 4, nil, nil)
end
 
function suite:testCategory_pc_pc2_help_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 12, nil, nil)
end
 
function suite:testCategory_pc_pc2_portal_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 100, nil, nil)
end
 
function suite:testCategory_pc_pc2_template_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 10, nil, nil)
end
 
function suite:testCategory_pc_pc2_category_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 14, nil, nil)
end
 
function suite:testCategory_pc_pc2_talk_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 1, nil, nil)
end
 
function suite:testCategory_pc_pc2_main_all_all()
self:assertCategoryEqualsassertProtectionCategoryEquals('Wikipedia pending changes protected pages (level 2)', d.pc, d.pc2, 0, nil, nil)
end
 
Line 954 ⟶ 984:
-- 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
--------------------------------------------------------------------------------
 
d.padlockDivStartDefault = '<div class="metadata topicon nopopups" id="protected-icon" style="display:none;right:55px;">'
d.padlockDivStart65px = '<div class="metadata topicon nopopups" id="protected-icon" style="display:none;right:65px;">'
d.padlockDivEnd = '</div>'
d.imagePattern = '%[%[Image:.-%]%]'
 
function suite:testRenderPadlockDefault()
local expected = suite.escapePattern(d.padlockDivStartDefault)
.. d.imagePattern
.. suite.escapePattern(d.padlockDivEnd)
local actual = pp.renderPadlock('[[Image:Padlock.svg|20px]]')
self:assertStringContains(expected, actual)
end
 
function suite:testRenderPadlockDefault()
local expected = suite.escapePattern(d.padlockDivStart65px)
.. d.imagePattern
.. suite.escapePattern(d.padlockDivEnd)
local actual = pp.renderPadlock('[[Image:Padlock.svg|20px]]', '65px')
self:assertStringContains(expected, actual)
end
 
return suite