1 package net.pterodactylus.rhynodge.filters.comics
3 import net.pterodactylus.rhynodge.filters.ResourceLoader.*
4 import net.pterodactylus.rhynodge.states.*
5 import net.pterodactylus.rhynodge.states.ComicState.*
6 import org.hamcrest.MatcherAssert.*
7 import org.hamcrest.Matchers.*
10 class TheMonsterUnderTheBedFilterTest {
12 private val filter = TheMonsterUnderTheBedFilter()
13 private val htmlState = loadDocument(TheMonsterUnderTheBedFilter::class.java, "the-monster-under-the-bed.html", "http://themonsterunderthebed.net/")
14 .let { HtmlState("http://themonsterunderthebed.net/", it) }
17 fun `filter can parse comic from html`() {
18 val state = filter.filter(htmlState) as ComicState
19 assertThat(state.comics(), contains(
21 .add(Strip("http://themonsterunderthebed.net/wp-content/uploads/2018/07/153-Push.png", ""))