@@ -41,11 +41,11 @@ func TestHookFires(t *testing.T) {
4141
4242 LogAndAssertJSON (t , func (log * Logger ) {
4343 log .Hooks .Add (hook )
44- assert .Equal (t , hook .Fired , false )
44+ assert .False (t , hook .Fired )
4545
4646 log .Print ("test" )
4747 }, func (fields Fields ) {
48- assert .Equal (t , hook .Fired , true )
48+ assert .True (t , hook .Fired )
4949 })
5050}
5151
@@ -76,7 +76,7 @@ func TestHookCanModifyEntry(t *testing.T) {
7676 log .Hooks .Add (hook )
7777 log .WithField ("wow" , "elephant" ).Print ("test" )
7878 }, func (fields Fields ) {
79- assert .Equal (t , fields [ "wow" ], "whale" )
79+ assert .Equal (t , "whale" , fields [ "wow" ] )
8080 })
8181}
8282
@@ -90,8 +90,8 @@ func TestCanFireMultipleHooks(t *testing.T) {
9090
9191 log .WithField ("wow" , "elephant" ).Print ("test" )
9292 }, func (fields Fields ) {
93- assert .Equal (t , fields [ "wow" ], "whale" )
94- assert .Equal (t , hook2 .Fired , true )
93+ assert .Equal (t , "whale" , fields [ "wow" ] )
94+ assert .True (t , hook2 .Fired )
9595 })
9696}
9797
@@ -157,7 +157,7 @@ func TestErrorHookShouldntFireOnInfo(t *testing.T) {
157157 log .Hooks .Add (hook )
158158 log .Info ("test" )
159159 }, func (fields Fields ) {
160- assert .Equal (t , hook .Fired , false )
160+ assert .False (t , hook .Fired )
161161 })
162162}
163163
@@ -168,7 +168,7 @@ func TestErrorHookShouldFireOnError(t *testing.T) {
168168 log .Hooks .Add (hook )
169169 log .Error ("test" )
170170 }, func (fields Fields ) {
171- assert .Equal (t , hook .Fired , true )
171+ assert .True (t , hook .Fired )
172172 })
173173}
174174
0 commit comments