Browse Source

fix tests

boyska 6 years ago
parent
commit
b08952ebf4
1 changed files with 3 additions and 3 deletions
  1. 3 3
      conf_test.go

+ 3 - 3
conf_test.go

@@ -8,7 +8,7 @@ type TestCase struct {
 	E string // expected
 }
 
-var good []TestCase = []TestCase{
+var good = []TestCase{
 	// simplest case
 	TestCase{G: Global{ViewPathBase: "/", ViewURLBase: "http://localhost/"}, P: "/", E: "http://localhost/"},
 	// prefix == path
@@ -27,11 +27,11 @@ var good []TestCase = []TestCase{
 
 func TestViewURL(t *testing.T) {
 	for _, test := range good {
-		val, err := test.G.GetShareURL(test.P)
+		val, err := test.G.GetViewURL(test.P)
 		if err != nil {
 			t.Error(err)
 		}
-		if val != test.E {
+		if val.String() != test.E {
 			t.Fail()
 		}
 	}