Gfycat Tests & Fix for bad reddit submissions

Added and restructured Gfycat tests.

 - Rips from reddit go in Reddit Test Suite
 - Direct rips from Gfycat go in the Gfycat Test Suite
Task #361 - Some gfycat doesn't work
This commit is contained in:
Kevin Jiang 2018-01-05 17:11:46 -05:00
parent d0b93ea100
commit 8cee441252

View File

@ -5,6 +5,7 @@ import java.io.IOException;
import java.net.URL;
import com.rarchives.ripme.ripper.rippers.RedditRipper;
import com.rarchives.ripme.ripper.rippers.video.GfycatRipper;
public class RedditRipperTest extends RippersTest {
// https://github.com/RipMeApp/ripme/issues/253 - Disabled tests: RedditRipperTest#testRedditSubreddit*Rip is flaky
@ -22,4 +23,25 @@ public class RedditRipperTest extends RippersTest {
RedditRipper ripper = new RedditRipper(new URL("http://www.reddit.com/r/UnrealGirls/comments/1ziuhl/in_class_veronique_popa/"));
testRipper(ripper);
}
/**
* GFYCAT TEST
* Tests a good GfycatURL (no "/gifs/detail")
* @throws IOException
*/
public void testRedditGfyGoodURL() throws IOException {
GfycatRipper ripper = new GfycatRipper(new URL("https://www.reddit.com/r/bottesting/comments/7msozf/good_link/"));
testRipper(ripper);
}
/**
* GFYCAT TEST
* Tests a Bad URL with the "/gifs/detail" inside.
* @throws IOException
*/
public void testRedditGfyBadURL() throws IOException {
GfycatRipper ripper = new GfycatRipper(new URL("https://www.reddit.com/r/bottesting/comments/7msmhi/bad_link/"));
testRipper(ripper);
}
}