Skip to content

Commit

Permalink
Make sure to test the defaultProfanityDetector
Browse files Browse the repository at this point in the history
  • Loading branch information
TwiN committed Sep 26, 2021
1 parent ee3155b commit 39ccb87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions goaway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
)

func TestExtractProfanity(t *testing.T) {
defaultProfanityDetector = nil
tests := []struct {
input string
expectedProfanity string
Expand Down Expand Up @@ -347,6 +348,7 @@ func TestSentencesWithFalsePositivesAndProfanities(t *testing.T) {
// "The Adventures of Sherlock Holmes" by Arthur Conan Doyle is in the public domain,
// which makes it a perfect source to use as reference.
func TestSentencesFromTheAdventuresOfSherlockHolmes(t *testing.T) {
defaultProfanityDetector = nil
sentences := []string{
"I had called upon my friend, Mr. Sherlock Holmes, one day in the autumn of last year and found him in deep conversation with a very stout, florid-faced, elderly gentleman with fiery red hair.",
"With an apology for my intrusion, I was about to withdraw when Holmes pulled me abruptly into the room and closed the door behind me.",
Expand Down

0 comments on commit 39ccb87

Please sign in to comment.