Skip to content

Commit

Permalink
fix: convert type in test
Browse files Browse the repository at this point in the history
  • Loading branch information
reu98 committed Mar 27, 2024
1 parent df40205 commit 4b0e1a0
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 4b0e1a0

Please sign in to comment.