package com.rarchives.ripme.tst.ripper.rippers;

import com.rarchives.ripme.ripper.rippers.GfycatRipper;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.net.URL;


public class GfycatRipperTest extends RippersTest {
    
    /**
     * Rips correctly formatted URL directly from Gfycat
     * @throws IOException 
     */
    @Test
    public void testGfycatGoodURL() throws IOException{
        GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/TemptingExcellentIchthyosaurs"));
        testRipper(ripper);
    }
    /**
     * Rips badly formatted URL directly from Gfycat
     * @throws IOException 
     */
    public void testGfycatBadURL() throws IOException {
        GfycatRipper ripper  = new GfycatRipper(new URL("https://gfycat.com/gifs/detail/limitedtestyamericancrow"));
        testRipper(ripper);
    }

    public void testGfycatProfile() throws IOException {
        GfycatRipper ripper  = new GfycatRipper(new URL("https://gfycat.com/@golbanstorage"));
        testRipper(ripper);
    }
}
@@ -886,16 +886,93 @@
    %7D%0D%0A%0D%0A
+    /**%0D%0A     * Rips a Gfycat profile%0D%0A     * @throws IOException %0D%0A     */%0D%0A
     publ
@@ -1013,32 +1013,32 @@
  IOException %7B%0D%0A
-
         GfycatRi
@@ -1153,9 +1153,300 @@
 %0A    %7D%0D%0A
-%7D
+    %0D%0A    /**%0D%0A     * Rips a Gfycat amp link %0D%0A     * @throws IOException %0D%0A     */%0D%0A    public void testGfycatAmp() throws IOException %7B%0D%0A        GfycatRipper ripper = new GfycatRipper(new URL(%22https://gfycat.com/amp/TemptingExcellentIchthyosaurs%22));%0D%0A        testRipper(ripper);%0D%0A    %7D%0D%0A%7D%0D%0A

Add unit test for Gfycat Amp links