shithub: hugo

Download patch

ref: be2c67ad4592afac97518e5822f5154695630461
parent: beb32af7a29bb50f3d461d52120309980cf44688
author: bep <[email protected]>
date: Wed Apr 22 14:59:46 EDT 2015

Fix broken Travis tests

No idea why these suddenly starts to fail.

--- a/hugolib/pagination_test.go
+++ b/hugolib/pagination_test.go
@@ -5,6 +5,7 @@
 	"github.com/spf13/hugo/source"
 	"github.com/spf13/viper"
 	"github.com/stretchr/testify/assert"
+	"html/template"
 	"path/filepath"
 	"testing"
 )
@@ -43,7 +44,7 @@
 	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 @@
 	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())
--- a/hugolib/scratch_test.go
+++ b/hugolib/scratch_test.go
@@ -11,7 +11,7 @@
 	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))