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

Content deleted Content added
add tests for template protection
add blp category tets
Line 365:
 
function suite:testCategory_edit_semi_template_all_all()
self:assertCategoryEquals('Wikipedia semi-protected templates', 'edit', 'semi', 10, nil'indef', nil)
end
 
Line 500:
end
 
--------------------------------------------------------------------------------
-- Categories: blp
--------------------------------------------------------------------------------
 
function suite:testCategory_edit_semi_main_blp_indef()
self:assertCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', 'edit', 'semi', 0, 'blp', 'indef')
end
 
function suite:testCategory_edit_semi_talk_blp_indef()
self:assertCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', 'edit', 'semi', 1, 'blp', 'indef')
end
 
function suite:testCategory_edit_semi_file_blp_indef()
self:assertCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', 'edit', 'semi', 6, 'blp', 'indef')
end
 
function suite:testCategory_edit_semi_template_blp_indef()
self:assertCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', 'edit', 'semi', 10, 'blp', 'indef')
end
 
function suite:testCategory_edit_semi_main_blp_all()
self:assertCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', 'edit', 'semi', 0, 'blp', nil)
end
 
function suite:testCategory_edit_semi_talk_blp_all()
self:assertCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', 'edit', 'semi', 1, 'blp', nil)
end
 
function suite:testCategory_edit_semi_file_blp_all()
self:assertCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', 'edit', 'semi', 6, 'blp', nil)
end
 
function suite:testCategory_edit_semi_template_blp_all()
self:assertCategoryEquals('Wikipedia indefinitely semi-protected biographies of living people', 'edit', 'semi', 10, 'blp', nil)
end
 
function suite:testCategory_edit_semi_main_blp_temp()
self:assertCategoryEquals('Wikipedia temporarily semi-protected biographies of living people', 'edit', 'semi', 0, 'blp', timestamp)
end
 
function suite:testCategory_edit_semi_talk_blp_temp()
self:assertCategoryEquals('Wikipedia temporarily semi-protected biographies of living people', 'edit', 'semi', 1, 'blp', timestamp)
end
 
function suite:testCategory_edit_semi_file_blp_temp()
self:assertCategoryEquals('Wikipedia temporarily semi-protected biographies of living people', 'edit', 'semi', 6, 'blp', timestamp)
end
 
function suite:testCategory_edit_semi_template_blp_temp()
self:assertCategoryEquals('Wikipedia temporarily semi-protected biographies of living people', 'edit', 'semi', 10, 'blp', timestamp)
end
 
function suite:testCategory_edit_full_main_blp_indef()
self:assertCategoryEquals('Wikipedia indefinitely protected biographies of living people', 'edit', 'full', 0, 'blp', 'indef')
end
 
function suite:testCategory_edit_full_talk_blp_indef()
self:assertCategoryEquals('Wikipedia indefinitely protected biographies of living people', 'edit', 'full', 1, 'blp', 'indef')
end
 
function suite:testCategory_edit_full_file_blp_indef()
self:assertCategoryEquals('Wikipedia indefinitely protected biographies of living people', 'edit', 'full', 6, 'blp', 'indef')
end
 
function suite:testCategory_edit_full_template_blp_indef()
self:assertCategoryEquals('Wikipedia indefinitely protected biographies of living people', 'edit', 'full', 10, 'blp', 'indef')
end
 
function suite:testCategory_edit_full_main_blp_all()
self:assertCategoryEquals('Wikipedia indefinitely protected biographies of living people', 'edit', 'full', 0, 'blp', nil)
end
 
function suite:testCategory_edit_full_talk_blp_all()
self:assertCategoryEquals('Wikipedia indefinitely protected biographies of living people', 'edit', 'full', 1, 'blp', nil)
end
 
function suite:testCategory_edit_full_file_blp_all()
self:assertCategoryEquals('Wikipedia indefinitely protected biographies of living people', 'edit', 'full', 6, 'blp', nil)
end
 
function suite:testCategory_edit_full_template_blp_all()
self:assertCategoryEquals('Wikipedia indefinitely protected biographies of living people', 'edit', 'full', 10, 'blp', nil)
end
 
function suite:testCategory_edit_full_main_blp_temp()
self:assertCategoryEquals('Wikipedia temporarily protected biographies of living people', 'edit', 'full', 0, 'blp', timestamp)
end
 
function suite:testCategory_edit_full_talk_blp_temp()
self:assertCategoryEquals('Wikipedia temporarily protected biographies of living people', 'edit', 'full', 1, 'blp', timestamp)
end
 
function suite:testCategory_edit_full_file_blp_temp()
self:assertCategoryEquals('Wikipedia temporarily protected biographies of living people', 'edit', 'full', 6, 'blp', timestamp)
end
 
function suite:testCategory_edit_full_template_blp_temp()
self:assertCategoryEquals('Wikipedia temporarily protected biographies of living people', 'edit', 'full', 10, 'blp', timestamp)
end
 
return suite