-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added close html filter implementation with Jsoup
- Loading branch information
Showing
2 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/test/java/com/hubspot/jinjava/lib/filter/CloseHtmlFilterTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.hubspot.jinjava.lib.filter; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import com.google.common.collect.ImmutableMap; | ||
import com.hubspot.jinjava.BaseInterpretingTest; | ||
import com.hubspot.jinjava.BaseJinjavaTest; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
public class CloseHtmlFilterTest extends BaseInterpretingTest { | ||
CloseHtmlFilter f; | ||
|
||
@Before | ||
public void setup() { | ||
f = new CloseHtmlFilter(); | ||
} | ||
|
||
@Test | ||
public void itClosesTags() { | ||
String openTags = "<p>Hello, world!"; | ||
assertThat(f.filter(openTags, interpreter)).isEqualTo("<p>Hello, world!</p>"); | ||
} | ||
} |