Skip to content

Commit

Permalink
Minor linter fixes, fixed issue #49
Browse files Browse the repository at this point in the history
This closes issue #49
  • Loading branch information
mrz1836 committed Apr 24, 2024
1 parent ddffa93 commit 89082d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sanitize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

// TestAlpha tests the alpha sanitize method
Expand Down Expand Up @@ -355,7 +356,7 @@ func TestDomain(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
output, err := Domain(test.input, test.preserveCase, test.removeWww)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, test.expected, output)
})
}
Expand Down Expand Up @@ -388,7 +389,7 @@ func TestDomain(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
output, err := Domain(test.input, test.preserveCase, test.removeWww)
assert.Error(t, err)
require.Error(t, err)
assert.Equal(t, test.expected, output)
})
}
Expand Down Expand Up @@ -951,7 +952,7 @@ func TestURL(t *testing.T) {
// BenchmarkURL benchmarks the URL method
func BenchmarkURL(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = XSS("/Test/This/Url/?param=value")
_ = URL("/Test/This/Url/?param=value")
}
}

Expand Down

0 comments on commit 89082d2

Please sign in to comment.