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:24 -05:00
parent 8960b8a565
commit d0b93ea100

View File

@ -8,25 +8,19 @@ import java.net.URL;
public class GfycatRipperTest extends RippersTest { public class GfycatRipperTest extends RippersTest {
/** /**
* REDDIT TEST * Rips correctly formatted URL directly from Gfycat
* Tests a good GfycatURL (no "/gifs/detail")
* @throws IOException * @throws IOException
*/ */
public void testRedditGfyGoodURL() throws IOException { public void GfycatGoodURL() throws IOException{
GfycatRipper ripper = new GfycatRipper(new URL("https://www.reddit.com/r/bottesting/comments/7msozf/good_link/")); GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/TemptingExcellentIchthyosaurs"));
testRipper(ripper); testRipper(ripper);
} }
/** /**
* REDDIT TEST * Rips badly formatted URL directly from Gfycat
* Tests a Bad URL with the "/gifs/detail" inside.
* @throws IOException * @throws IOException
*/ */
public void testRedditGfyBadURL() throws IOException { public void GfycatBadURL() throws IOException {
GfycatRipper ripper = new GfycatRipper(new URL("https://www.reddit.com/r/bottesting/comments/7msmhi/bad_link/")); GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/gifs/detail/limitedtestyamericancrow"));
testRipper(ripper); testRipper(ripper);
} }
} }