Skip to content

Commit

Permalink
test: refactor test assertions for mode settings
Browse files Browse the repository at this point in the history
- Update test assertions for mode setting in `mode_test.go`

Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed May 8, 2024
1 parent 8b2d9c6 commit 3bd58a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func TestSetMode(t *testing.T) {
os.Unsetenv(EnvGinMode)

SetMode("")
assert.Equal(t, int32(debugCode), atomic.LoadInt32(&ginMode))
assert.Equal(t, DebugMode, Mode())
assert.Equal(t, int32(testCode), atomic.LoadInt32(&ginMode))
assert.Equal(t, TestMode, Mode())

SetMode(DebugMode)
assert.Equal(t, int32(debugCode), atomic.LoadInt32(&ginMode))
Expand Down

0 comments on commit 3bd58a8

Please sign in to comment.