Module:Professional wrestling profiles/testcases
Jump to navigation
Jump to search
| File:Gnome-applications-science.svg | This is the test cases page for the module Module:Professional wrestling profiles. Results of the test cases. |
-- Example Unit tests for [[Module:Professional wrestling]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_profiles_blank()
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles}}', '');
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=John Cena}}', '');
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|type=person}}', '');
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=John Cena|type=person}}', '');
end
function p:test_profiles_single()
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|wwe=john-cena}}', "Professional wrestling profiles/testcases's profile at [https://www.wwe.com/superstars/john-cena WWE]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=John Cena|wwe=john-cena}}', "John Cena's profile at [https://www.wwe.com/superstars/john-cena WWE]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=Claudio Castagnoli|roh=claudio-castagnoli}}', "Claudio Castagnoli's profile at [https://www.ringofhonor.com/active-roster/claudio-castagnoli Ring of Honor]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=Zack Sabre Jr.|njpw=498}}', "Zack Sabre Jr.'s profile at [https://www.njpw1972.com/profile/498 New Japan Pro-Wrestling]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=John Cena|cagematch=691}}', "John Cena's profile at [https://www.cagematch.net/?id=2&nr=691 Cagematch]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=John Cena|wrestlingdata=336}}', "John Cena's profile at [https://www.wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=John Cena|iwd=john-cena-350}}', "John Cena's profile at [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=Bret Hart|wrestlingtitles=hart_bret}}', "Bret Hart's profile at [https://www.wrestling-titles.com/personalities/hart_bret/ Wrestling-Titles]");
end
function p:test_profiles_regular()
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|wwe=john-cena|cagematch=691|wrestlingdata=336|iwd=john-cena-350}}', "Professional wrestling profiles/testcases's profile at [https://www.wwe.com/superstars/john-cena WWE], [https://www.cagematch.net/?id=2&nr=691 Cagematch], [https://www.wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata], [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=John Cena|wwe=john-cena|cagematch=691|wrestlingdata=336|iwd=john-cena-350}}', "John Cena's profile at [https://www.wwe.com/superstars/john-cena WWE], [https://www.cagematch.net/?id=2&nr=691 Cagematch], [https://www.wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata], [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
end
function p:test_profiles_types()
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=John Cena|cagematch=691|wrestlingdata=336|iwd=john-cena-350|type=person}}', "John Cena's profile at [https://www.cagematch.net/?id=2&nr=691 Cagematch], [https://www.wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata], [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=Road Warriors|wwe=road-warriors|cagematch=59|wrestlingdata=2185|type=team}}', "Road Warriors's profile at [https://www.wwe.com/superstars/road-warriors WWE], [https://www.cagematch.net/?id=28&nr=59 Cagematch], [https://www.wrestlingdata.com/index.php?befehl=stables&stable=2185 Wrestlingdata]");
self:preprocess_equals('{{#invoke:Professional wrestling profiles|profiles|name=The New Day|cagematch=1574|wrestlingdata=164727|type=stable}}', "The New Day's profile at [https://www.cagematch.net/?id=29&nr=1574 Cagematch], [https://www.wrestlingdata.com/index.php?befehl=stables&stable=164727 Wrestlingdata]");
end
return p