Merge pull request #745 from cyian-1756/myhentaicomicsUnitTests

Added unit test for Myhentaicomics quickQueue
This commit is contained in:
cyian-1756 2018-06-28 06:46:50 -04:00 committed by GitHub
commit d851fb16a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,4 +21,18 @@ public class MyhentaicomicsRipperTest extends RippersTest {
// Test a tag
assertEquals("2409", ripper.getGID(new URL("http://myhentaicomics.com/index.php/tag/2409/")));
}
public void testGetAlbumsToQueue() throws IOException {
URL url = new URL("https://myhentaicomics.com/index.php/tag/3167/");
MyhentaicomicsRipper ripper = new MyhentaicomicsRipper(url);
assertEquals(15, ripper.getAlbumsToQueue(ripper.getFirstPage()).size());
}
public void testPageContainsAlbums() throws IOException {
URL url = new URL("https://myhentaicomics.com/index.php/tag/3167/");
URL url2 = new URL("https://myhentaicomics.com/index.php/search?q=test");
MyhentaicomicsRipper ripper = new MyhentaicomicsRipper(url);
assertTrue(ripper.pageContainsAlbums(url));
assertTrue(ripper.pageContainsAlbums(url2));
}
}