Fix wrong placement of When in test
This commit is contained in:
@@ -32,25 +32,25 @@ var _ = Describe("publicURL", func() {
|
|||||||
Expect(actual).To(Equal("http://share.myotherserver.com/share/img/123?size=300"))
|
Expect(actual).To(Equal("http://share.myotherserver.com/share/img/123?size=300"))
|
||||||
|
|
||||||
})
|
})
|
||||||
When("ShareURL is not set", func() {
|
})
|
||||||
BeforeEach(func() {
|
When("ShareURL is not set", func() {
|
||||||
conf.Server.ShareURL = ""
|
BeforeEach(func() {
|
||||||
})
|
conf.Server.ShareURL = ""
|
||||||
It("uses AbsoluteURL", func() {
|
})
|
||||||
r, _ := http.NewRequest("GET", "https://myserver.com/share/123", nil)
|
It("uses AbsoluteURL", func() {
|
||||||
uri := path.Join(consts.URLPathPublic, "123")
|
r, _ := http.NewRequest("GET", "https://myserver.com/share/123", nil)
|
||||||
actual := publicURL(r, uri, nil)
|
uri := path.Join(consts.URLPathPublic, "123")
|
||||||
Expect(actual).To(Equal("https://myserver.com/share/123"))
|
actual := publicURL(r, uri, nil)
|
||||||
})
|
Expect(actual).To(Equal("https://myserver.com/share/123"))
|
||||||
It("concatenates params if provided", func() {
|
})
|
||||||
r, _ := http.NewRequest("GET", "https://myserver.com/share/123", nil)
|
It("concatenates params if provided", func() {
|
||||||
uri := path.Join(consts.URLPathPublicImages, "123")
|
r, _ := http.NewRequest("GET", "https://myserver.com/share/123", nil)
|
||||||
params := url.Values{
|
uri := path.Join(consts.URLPathPublicImages, "123")
|
||||||
"size": []string{"300"},
|
params := url.Values{
|
||||||
}
|
"size": []string{"300"},
|
||||||
actual := publicURL(r, uri, params)
|
}
|
||||||
Expect(actual).To(Equal("https://myserver.com/share/img/123?size=300"))
|
actual := publicURL(r, uri, params)
|
||||||
})
|
Expect(actual).To(Equal("https://myserver.com/share/img/123?size=300"))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user