fix tests

This commit is contained in:
boyska 2017-09-23 20:01:48 +02:00
parent c8e002b5c4
commit b08952ebf4

View file

@ -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()
}
}