Skip to content

Commit

Permalink
chore: String() instead of fmt.Sprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
testwill committed Jul 9, 2023
1 parent df5e4f4 commit 1166b0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions remote/response_status_code_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package remote

import (
"fmt"
"testing"

"github.com/stretchr/testify/assert"
Expand All @@ -11,9 +10,9 @@ func TestStatusCode_String(t *testing.T) {
assert := assert.New(t)
for i := 0; i < int(ResponseStatusCodeMAX); i++ {
code := ResponseStatusCode(i)
assert.NotEmpty(fmt.Sprintf("%s", code))
assert.NotEmpty(code.String())
}
s := fmt.Sprintf("%s", ResponseStatusCode(100))
s := ResponseStatusCode(100).String()
assert.Equal(s, "ResponseStatusCode-100")
}

Expand Down

0 comments on commit 1166b0e

Please sign in to comment.