Skip to content

Commit

Permalink
Fix assertion order
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuratczyk committed Feb 12, 2024
1 parent 4fa4f9f commit c071892
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,20 @@ func TestAutoUseMillis(t *testing.T) {
rootCmd := RootCmd()
rootCmd.SetArgs(args)
_ = rootCmd.Execute()
assert.Equal(t, cfg.UseMillis, false)
assert.Equal(t, false, cfg.UseMillis)

// if -x 0, use-millis is true
args = []string{"amqp", "-x", "0", "-D", "0"}
rootCmd = RootCmd()
rootCmd.SetArgs(args)
_ = rootCmd.Execute()
assert.Equal(t, cfg.UseMillis, true)
assert.Equal(t, true, cfg.UseMillis)

// if -y 0, use-millis is true
args = []string{"amqp", "-y", "0", "-C", "0"}
rootCmd = RootCmd()
rootCmd.SetArgs(args)
_ = rootCmd.Execute()
assert.Equal(t, cfg.UseMillis, true)
assert.Equal(t, true, cfg.UseMillis)

}

0 comments on commit c071892

Please sign in to comment.