Skip to content

Commit

Permalink
Merge pull request #12 from reu98/fix/testing
Browse files Browse the repository at this point in the history
fix: convert type in test
  • Loading branch information
reu98 authored Mar 27, 2024
2 parents df40205 + 4b0e1a0 commit 9c98e98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions captcha_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ func TestCreateByMathByOption(t *testing.T) {
require.IsType(t, dataType, *data)
require.NotEmpty(t, (*data).Data)

result, err := strconv.Atoi((*data).Text)
result, err := strconv.Atoi(data.Text)
require.NoError(t, err)

require.GreaterOrEqual(t, result, int(minMath)-int(maxMath))
require.LessOrEqual(t, result, int(maxMath)*2)
require.LessOrEqual(t, result, int(maxMath*2))
}

func TestCreateCaptcha(t *testing.T) {
Expand Down

0 comments on commit 9c98e98

Please sign in to comment.