Module:Professional wrestling profiles/testcases
Appearance
![]() | 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}}', '[[Category:Professional wrestling profiles template without any identifiers]]');
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|name = John Cena}}', '[[Category:Professional wrestling profiles template without any identifiers]]');
end
function p:test_profiles_single()
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|cagematch = 691}}', "Professional wrestling/testcases's profile at [http://www.cagematch.net/?id=2&nr=691 Cagematch.net]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|name = John Cena|cagematch = 691}}', "John Cena's profile at [http://www.cagematch.net/?id=2&nr=691 Cagematch.net]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|wrestlingdata = 336}}', "Professional wrestling/testcases's profile at [http://wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata.com]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|name = John Cena|wrestlingdata = 336}}', "John Cena's profile at [http://wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata.com]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|iwd = john-cena-350}}', "Professional wrestling/testcases's profile at [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
self:preprocess_equals('{{#invoke:Professional wrestling | 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]");
end
function p:test_profiles_double()
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|cagematch = 691|wrestlingdata = 336}}', "Professional wrestling/testcases's profile at [http://www.cagematch.net/?id=2&nr=691 Cagematch.net], [http://wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata.com]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|name = John Cena|cagematch = 691|wrestlingdata = 336}}', "John Cena's profile at [http://www.cagematch.net/?id=2&nr=691 Cagematch.net], [http://wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata.com]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|cagematch = 691|iwd =john-cena-350}}', "Professional wrestling/testcases's profile at [http://www.cagematch.net/?id=2&nr=691 Cagematch.net], [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|name = John Cena|cagematch = 691|iwd =john-cena-350}}', "John Cena's profile at [http://www.cagematch.net/?id=2&nr=691 Cagematch.net], [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|wrestlingdata = 336|iwd =john-cena-350}}', "Professional wrestling/testcases's profile at [http://wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata.com], [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|name = John Cena|wrestlingdata = 336|iwd =john-cena-350}}', "John Cena's profile at [http://wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata.com], [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
end
function p:test_profiles_triple()
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|cagematch = 691|wrestlingdata = 336|iwd =john-cena-350}}', "Professional wrestling/testcases's profile at [http://www.cagematch.net/?id=2&nr=691 Cagematch.net], [http://wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata.com], [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
self:preprocess_equals('{{#invoke:Professional wrestling | profiles|name = John Cena|cagematch = 691|wrestlingdata = 336|iwd =john-cena-350}}', "John Cena's profile at [http://www.cagematch.net/?id=2&nr=691 Cagematch.net], [http://wrestlingdata.com/index.php?befehl=bios&wrestler=336 Wrestlingdata.com], [http://www.profightdb.com/wrestlers/john-cena-350.html Internet Wrestling Database]");
end
function p:test_wrestling_titles()
self:preprocess_equals('{{#invoke:Professional wrestling | wrestlingtitlespersonalities|id = zbyszko_stanislaus|name = Stanislaus Zbyszko}}', "[http://www.wrestling-titles.com/personalities/zbyszko_stanislaus/ Stanislaus Zbyszko]'s profile at Wrestling-Titles.com");
self:preprocess_equals('{{#invoke:Professional wrestling | wrestlingtitlespersonalities|id = zbyszko_stanislaus}}', "[http://www.wrestling-titles.com/personalities/zbyszko_stanislaus/ Professional wrestling/testcases]'s profile at Wrestling-Titles.com");
self:preprocess_equals('{{#invoke:Professional wrestling | wrestlingtitlespersonalities|zbyszko_stanislaus| Stanislaus Zbyszko}}', "[http://www.wrestling-titles.com/personalities/zbyszko_stanislaus/ Stanislaus Zbyszko]'s profile at Wrestling-Titles.com");
self:preprocess_equals('{{#invoke:Professional wrestling | wrestlingtitlespersonalities|zbyszko_stanislaus}}', "[http://www.wrestling-titles.com/personalities/zbyszko_stanislaus/ Professional wrestling/testcases]'s profile at Wrestling-Titles.com");
self:preprocess_equals('{{#invoke:Professional wrestling | wrestlingtitlespersonalities|}}', "[[Category:Wrestling Titles template with no id set]]");
self:preprocess_equals('{{#invoke:Professional wrestling | wrestlingtitlespersonalities| name = test}}', "[[Category:Wrestling Titles template with no id set]]");
end
function p:test_cage_match()
self:preprocess_equals('{{#invoke:Professional wrestling | cagematch|id = 691|name = John Cena}}', "[http://www.cagematch.net/?id=2&nr=691 John Cena]'s profile at Cagematch.net");
self:preprocess_equals('{{#invoke:Professional wrestling | cagematch|id = 691}}', "[http://www.cagematch.net/?id=2&nr=691 Professional wrestling/testcases]'s profile at Cagematch.net");
self:preprocess_equals('{{#invoke:Professional wrestling | cagematch|691| John Cena}}', "[http://www.cagematch.net/?id=2&nr=691 John Cena]'s profile at Cagematch.net");
self:preprocess_equals('{{#invoke:Professional wrestling | cagematch|691}}', "[http://www.cagematch.net/?id=2&nr=691 Professional wrestling/testcases]'s profile at Cagematch.net");
self:preprocess_equals('{{#invoke:Professional wrestling | cagematch|}}', "");
self:preprocess_equals('{{#invoke:Professional wrestling | cagematch| name = John Cena}}', "");
end
function p:test_rohroster()
self:preprocess_equals('{{#invoke:Professional wrestling | rohroster|id = matt-sydal|name = Matt Sydal}}', "[http://www.rohwrestling.com/wrestlers/roster/matt-sydal Matt Sydal]'s [[Ring of Honor]] profile");
self:preprocess_equals('{{#invoke:Professional wrestling | rohroster|id = matt-sydal}}', "[http://www.rohwrestling.com/wrestlers/roster/matt-sydal Professional wrestling/testcases]'s [[Ring of Honor]] profile");
self:preprocess_equals('{{#invoke:Professional wrestling | rohroster|matt-sydal| Matt Sydal}}', "[http://www.rohwrestling.com/wrestlers/roster/matt-sydal Matt Sydal]'s [[Ring of Honor]] profile");
self:preprocess_equals('{{#invoke:Professional wrestling | rohroster|matt-sydal}}', "[http://www.rohwrestling.com/wrestlers/roster/matt-sydal Professional wrestling/testcases]'s [[Ring of Honor]] profile");
self:preprocess_equals('{{#invoke:Professional wrestling | rohroster|}}', "");
self:preprocess_equals('{{#invoke:Professional wrestling | rohroster| name = Matt Sydal}}', "");
end
function p:test_njpw()
self:preprocess_equals('{{#invoke:Professional wrestling | njpw|id = 932|name = Matt Sydal}}', "[http://www.njpw.co.jp/english/data/detail_profile.php?f=932 Matt Sydal]'s [[New Japan Pro Wrestling]] profile");
self:preprocess_equals('{{#invoke:Professional wrestling | njpw|id = 932}}', "[http://www.njpw.co.jp/english/data/detail_profile.php?f=932 Professional wrestling/testcases]'s [[New Japan Pro Wrestling]] profile");
self:preprocess_equals('{{#invoke:Professional wrestling | njpw|932| Matt Sydal}}', "[http://www.njpw.co.jp/english/data/detail_profile.php?f=932 Matt Sydal]'s [[New Japan Pro Wrestling]] profile");
self:preprocess_equals('{{#invoke:Professional wrestling | njpw|932}}', "[http://www.njpw.co.jp/english/data/detail_profile.php?f=932 Professional wrestling/testcases]'s [[New Japan Pro Wrestling]] profile");
self:preprocess_equals('{{#invoke:Professional wrestling | njpw|}}', "");
self:preprocess_equals('{{#invoke:Professional wrestling | njpw| name = Matt Sydal}}', "");
end
return p