[Bandcamp] Add tests for external bandcamp artists

Necessary, because the external pages tested before were converted to bandcamp.com pages. See f9d06252f2
This commit is contained in:
TobiGr 2021-03-13 20:51:54 +01:00
parent f9d06252f2
commit 70d9e389b9
2 changed files with 11 additions and 2 deletions

View File

@ -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)

View File

@ -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"));
}
}