1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-28 16:19:58 +02:00

Fixed Tsumino ripper unit test

This commit is contained in:
cyian-1756
2018-10-23 05:03:55 -04:00
parent 302e7279cd
commit d29bc69279

View File

@@ -11,22 +11,22 @@ import org.jsoup.nodes.Document;
public class TsuminoRipperTest extends RippersTest {
public void testTsuminoRipper() throws IOException {
TsuminoRipper ripper = new TsuminoRipper(new URL("http://www.tsumino.com/Book/Info/42882/chaldea-maid-"));
TsuminoRipper ripper = new TsuminoRipper(new URL("http://www.tsumino.com/Book/Info/43528/sore-wa-kurokute-suketeita-what-s-tight-and-black-and-sheer-all-over-"));
testRipper(ripper);
}
public void testTagBlackList() throws IOException {
TsuminoRipper ripper = new TsuminoRipper(new URL("http://www.tsumino.com/Book/Info/42882/chaldea-maid-"));
TsuminoRipper ripper = new TsuminoRipper(new URL("http://www.tsumino.com/Book/Info/43528/sore-wa-kurokute-suketeita-what-s-tight-and-black-and-sheer-all-over-"));
Document doc = ripper.getFirstPage();
List<String> tagsOnPage = ripper.getTags(doc);
String[] tags1 = {"test", "one", "Blowjob"};
String[] tags1 = {"test", "one", "Smell"};
String blacklistedTag = RipUtils.checkTags(tags1, tagsOnPage);
assertEquals("blowjob", blacklistedTag);
assertEquals("smell", blacklistedTag);
// Test a tag with spaces
String[] tags2 = {"test", "one", "Full Color"};
String[] tags2 = {"test", "one", "Face sitting"};
blacklistedTag = RipUtils.checkTags(tags2, tagsOnPage);
assertEquals("full color", blacklistedTag);
assertEquals("face sitting", blacklistedTag);
// Test a album with no blacklisted tags
String[] tags3 = {"nothing", "one", "null"};