Gfycat Tests & Fix for bad reddit submissions

Added sanitization, and appropriate tests.
Task #361 - Some gfycat doesn't work
This commit is contained in:
Kevin Jiang 2018-01-05 17:01:31 -05:00
parent 0758fae312
commit 27e6f3fe0c

View File

@ -0,0 +1,32 @@
package com.rarchives.ripme.tst.ripper.rippers;
import com.rarchives.ripme.ripper.rippers.video.GfycatRipper;
import java.io.IOException;
import java.net.URL;
public class GfycatRipperTest extends RippersTest {
/**
* REDDIT 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);
}
/**
* REDDIT 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);
}
}