chore: set correct return URL in header

This commit is contained in:
2022-03-21 16:05:31 +01:00
parent 0aca62974c
commit 08e4868315
2 changed files with 11 additions and 9 deletions
+3 -3
View File
@@ -126,7 +126,7 @@ func TestServer(t *testing.T) {
wantResp: "success",
wantHeaders: map[string]string{
"Access-Control-Expose-Headers": "X-File-URL",
"X-File-URL": "https:/example.org/some/file",
"X-File-URL": "https://example.org/some/file",
},
},
{
@@ -175,7 +175,7 @@ func TestServer(t *testing.T) {
args: args{
store: func(t *testing.T) StoreFunc {
return func(path string, content io.Reader) error {
assert.Equal(t, "20211125/588b41ebf261820104615b83201c729bd16016d6e43649b28b0ef77d54ca5aaf8da0ce74ae3f20a4", path)
assert.Equal(t, "/20211125/588b41ebf261820104615b83201c729bd16016d6e43649b28b0ef77d54ca5aaf8da0ce74ae3f20a4", path)
temp, err := ioutil.ReadAll(content)
assert.NoError(t, err)
assert.Equal(t, "abc", string(temp))
@@ -210,7 +210,7 @@ func TestServer(t *testing.T) {
wantResp: "success",
wantHeaders: map[string]string{
"Access-Control-Expose-Headers": "X-File-URL",
"X-File-URL": "https:/example.org/20211125/588b41ebf261820104615b83201c729bd16016d6e43649b28b0ef77d54ca5aaf8da0ce74ae3f20a4",
"X-File-URL": "https://example.org/20211125/588b41ebf261820104615b83201c729bd16016d6e43649b28b0ef77d54ca5aaf8da0ce74ae3f20a4",
},
},
}