fix tests
This commit is contained in:
parent
c8e002b5c4
commit
b08952ebf4
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ type TestCase struct {
|
||||||
E string // expected
|
E string // expected
|
||||||
}
|
}
|
||||||
|
|
||||||
var good []TestCase = []TestCase{
|
var good = []TestCase{
|
||||||
// simplest case
|
// simplest case
|
||||||
TestCase{G: Global{ViewPathBase: "/", ViewURLBase: "http://localhost/"}, P: "/", E: "http://localhost/"},
|
TestCase{G: Global{ViewPathBase: "/", ViewURLBase: "http://localhost/"}, P: "/", E: "http://localhost/"},
|
||||||
// prefix == path
|
// prefix == path
|
||||||
|
@ -27,11 +27,11 @@ var good []TestCase = []TestCase{
|
||||||
|
|
||||||
func TestViewURL(t *testing.T) {
|
func TestViewURL(t *testing.T) {
|
||||||
for _, test := range good {
|
for _, test := range good {
|
||||||
val, err := test.G.GetShareURL(test.P)
|
val, err := test.G.GetViewURL(test.P)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
if val != test.E {
|
if val.String() != test.E {
|
||||||
t.Fail()
|
t.Fail()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue