Commit 70d9e389 authored by TobiGr's avatar TobiGr
Browse files

[Bandcamp] Add tests for external bandcamp artists

Necessary, because the external pages tested before were converted to bandcamp.com pages. See f9d06252
parent f9d06252
......@@ -29,6 +29,8 @@ public class BandcampChannelLinkHandlerFactoryTest {
assertTrue(linkHandler.acceptUrl("http://zachbenson.bandcamp.com"));
assertTrue(linkHandler.acceptUrl("https://zachbenson.bandcamp.com/"));
assertTrue(linkHandler.acceptUrl("https://billwurtz.bandcamp.com/releases"));
assertTrue(linkHandler.acceptUrl("https://interovgm.bandcamp.com/releases"));
assertTrue(linkHandler.acceptUrl("https://interovgm.bandcamp.com/releases/"));
assertTrue(linkHandler.acceptUrl("http://zachbenson.bandcamp.com/"));
......@@ -38,8 +40,9 @@ public class BandcampChannelLinkHandlerFactoryTest {
assertFalse(linkHandler.acceptUrl("https://daily.bandcamp.com/best-of-2020/bandcamp-daily-staffers-on-their-favorite-albums-of-2020"));
// External URLs
assertTrue(linkHandler.acceptUrl("https://interovgm.bandcamp.com/releases"));
assertTrue(linkHandler.acceptUrl("https://interovgm.bandcamp.com/releases/"));
assertTrue(linkHandler.acceptUrl("https://lobstertheremin.com"));
assertTrue(linkHandler.acceptUrl("https://lobstertheremin.com/music"));
assertTrue(linkHandler.acceptUrl("https://lobstertheremin.com/music/"));
assertFalse(linkHandler.acceptUrl("https://example.com/releases"));
}
......@@ -51,6 +54,9 @@ public class BandcampChannelLinkHandlerFactoryTest {
assertEquals("1581461772", linkHandler.getId("https://interovgm.bandcamp.com/releases"));
assertEquals("3321800855", linkHandler.getId("https://infiniteammo.bandcamp.com/"));
assertEquals("3775652329", linkHandler.getId("https://npet.bandcamp.com/"));
assertEquals("2735462545", linkHandler.getId("http://lobstertheremin.com/"));
assertEquals("2735462545", linkHandler.getId("https://lobstertheremin.com/music/"));
}
@Test
......@@ -58,6 +64,8 @@ public class BandcampChannelLinkHandlerFactoryTest {
assertEquals("https://macbenson.bandcamp.com", linkHandler.getUrl("1196681540"));
assertEquals("https://interovgm.bandcamp.com", linkHandler.getUrl("1581461772"));
assertEquals("https://infiniteammo.bandcamp.com", linkHandler.getUrl("3321800855"));
assertEquals("https://lobstertheremin.com", linkHandler.getUrl("2735462545"));
}
@Test(expected = ParsingException.class)
......
......@@ -49,5 +49,6 @@ public class BandcampStreamLinkHandlerFactoryTest {
assertTrue(linkHandler.acceptUrl("https://interovgm.bandcamp.com/track/title"));
assertTrue(linkHandler.acceptUrl("http://bandcamP.com/?show=38"));
assertTrue(linkHandler.acceptUrl("https://goodgoodblood-tl.bandcamp.com/track/when-it-all-wakes-up"));
assertTrue(linkHandler.acceptUrl("https://lobstertheremin.com/track/unfinished"));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment