1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-07-31 19:10:15 +02:00

Fixed failing test

This commit is contained in:
PaaaulZ
2021-01-02 03:15:47 +01:00
parent d1fa53dc8c
commit d2ac05f8f5

View File

@@ -10,7 +10,7 @@ import java.util.HashMap;
import java.util.Map;
public class ScrolllerRipperTest extends RippersTest {
/*@Test
@Test
public void testScrolllerGID() throws IOException {
Map<URL, String> testURLs = new HashMap<>();
@@ -21,17 +21,16 @@ public class ScrolllerRipperTest extends RippersTest {
for (URL url : testURLs.keySet()) {
ScrolllerRipper ripper = new ScrolllerRipper(url);
ripper.setup();
System.out.println(testURLs.get(url) + " |=>| " + ripper.getGID(ripper.getURL()));
Assertions.assertEquals(testURLs.get(url), ripper.getGID(ripper.getURL()));
deleteDir(ripper.getWorkingDir());
}
}*/
}
@Test
public void testScrolllerFilterRegex() throws IOException {
Map<URL, String> testURLs = new HashMap<>();
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp"), "");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp"), "NOFILTER");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=pictures"), "PICTURE");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=videos"), "VIDEO");
testURLs.put(new URL("https://scrolller.com/r/CatsStandingUp?filter=albums"), "ALBUM");
@@ -44,7 +43,6 @@ public class ScrolllerRipperTest extends RippersTest {
for (URL url : testURLs.keySet()) {
ScrolllerRipper ripper = new ScrolllerRipper(url);
ripper.setup();
System.out.println(url + " ==> " + testURLs.get(url) + " => " + ripper.convertFilterString(ripper.getParameter(ripper.getURL(),"filter")));
Assertions.assertEquals(testURLs.get(url), ripper.convertFilterString(ripper.getParameter(ripper.getURL(),"filter")));
deleteDir(ripper.getWorkingDir());
}