Fix broken Travis tests
authorbep <bjorn.erik.pedersen@gmail.com>
Wed, 22 Apr 2015 16:59:46 +0000 (18:59 +0200)
committerbep <bjorn.erik.pedersen@gmail.com>
Wed, 22 Apr 2015 16:59:42 +0000 (18:59 +0200)
No idea why these suddenly starts to fail.

hugolib/pagination_test.go
hugolib/scratch_test.go

index 7d2a9f1b111d9f755e6c5d1f73cf7970906f151c..f42197ba7fa0b0d64b8f09b8f2758489e0500ebe 100644 (file)
@@ -5,6 +5,7 @@ import (
        "github.com/spf13/hugo/source"
        "github.com/spf13/viper"
        "github.com/stretchr/testify/assert"
+       "html/template"
        "path/filepath"
        "testing"
 )
@@ -43,7 +44,7 @@ func TestPager(t *testing.T) {
        assert.Equal(t, 5, paginator.TotalPages())
 
        first := paginatorPages[0]
-       assert.Equal(t, "page/1/", first.URL())
+       assert.Equal(t, template.HTML("page/1/"), first.URL())
        assert.Equal(t, first.URL(), first.Url())
        assert.Equal(t, first, first.First())
        assert.True(t, first.HasNext())
@@ -59,7 +60,7 @@ func TestPager(t *testing.T) {
        assert.Equal(t, paginatorPages[1], third.Prev())
 
        last := paginatorPages[4]
-       assert.Equal(t, "page/5/", last.URL())
+       assert.Equal(t, template.HTML("page/5/"), last.URL())
        assert.Equal(t, last, last.Last())
        assert.False(t, last.HasNext())
        assert.Nil(t, last.Next())
index adff2c8a8ef0918297680469ae6f75f58a8422c8..c736f5a9910afb7187f3146174b76e34862af8bb 100644 (file)
@@ -11,7 +11,7 @@ func TestScratchAdd(t *testing.T) {
        scratch.Add("int1", 20)
        scratch.Add("int2", 20)
 
-       assert.Equal(t, 30, scratch.Get("int1"))
+       assert.Equal(t, int64(30), scratch.Get("int1"))
        assert.Equal(t, 20, scratch.Get("int2"))
 
        scratch.Add("float1", float64(10.5))