Replace assert.Equal(true/false) with assert.True/False
authorbep <bjorn.erik.pedersen@gmail.com>
Tue, 27 Jan 2015 18:47:22 +0000 (19:47 +0100)
committerbep <bjorn.erik.pedersen@gmail.com>
Tue, 27 Jan 2015 18:47:22 +0000 (19:47 +0100)
hugolib/pagination_test.go

index cbf14e16303cda4535865c1e8a247bb9d70b5a69..7fb8fa251e86fb92a5fc6e61f71339281c84e7f8 100644 (file)
@@ -45,24 +45,24 @@ func TestPager(t *testing.T) {
        first := paginatorPages[0]
        assert.Equal(t, "page/1/", first.Url())
        assert.Equal(t, first, first.First())
-       assert.Equal(t, true, first.HasNext())
+       assert.True(t, first.HasNext())
        assert.Equal(t, paginatorPages[1], first.Next())
-       assert.Equal(t, false, first.HasPrev())
+       assert.False(t, first.HasPrev())
        assert.Nil(t, first.Prev())
        assert.Equal(t, 5, first.NumberOfElements())
        assert.Equal(t, 1, first.PageNumber())
 
        third := paginatorPages[2]
-       assert.Equal(t, true, third.HasNext())
-       assert.Equal(t, true, third.HasPrev())
+       assert.True(t, third.HasNext())
+       assert.True(t, third.HasPrev())
        assert.Equal(t, paginatorPages[1], third.Prev())
 
        last := paginatorPages[4]
        assert.Equal(t, "page/5/", last.Url())
        assert.Equal(t, last, last.Last())
-       assert.Equal(t, false, last.HasNext())
+       assert.False(t, last.HasNext())
        assert.Nil(t, last.Next())
-       assert.Equal(t, true, last.HasPrev())
+       assert.True(t, last.HasPrev())
        assert.Equal(t, 1, last.NumberOfElements())
        assert.Equal(t, 5, last.PageNumber())
 }