diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-05-29 21:07:31 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-05-29 21:13:14 +0200 |
commit | 1ed866d31ddeec5ab484760bada2355bbf49c698 (patch) | |
tree | a278178ed8bc71f7349d1afce16cca2c798b7181 /src/rest-api/handler/handler_test.go | |
parent | rest-api: handle payloads with an api_key (diff) | |
download | fs-tracer-backend-1ed866d31ddeec5ab484760bada2355bbf49c698.tar.gz fs-tracer-backend-1ed866d31ddeec5ab484760bada2355bbf49c698.tar.bz2 fs-tracer-backend-1ed866d31ddeec5ab484760bada2355bbf49c698.zip |
rest-api: Take file path in query params
Diffstat (limited to 'src/rest-api/handler/handler_test.go')
-rw-r--r-- | src/rest-api/handler/handler_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rest-api/handler/handler_test.go b/src/rest-api/handler/handler_test.go index 4709959..183d584 100644 --- a/src/rest-api/handler/handler_test.go +++ b/src/rest-api/handler/handler_test.go @@ -24,7 +24,7 @@ func TestHandleGet(t *testing.T) { } db.EXPECT().GetLatestFileByPath(gomock.Any(), "/tmp/file.txt", "USER_ID").Return(file, nil) - handler.handleGet(recorder, httptest.NewRequest(http.MethodGet, "/file/%2ftmp%2Ffile.txt", nil), "USER_ID") + handler.handleGet(recorder, httptest.NewRequest(http.MethodGet, "/file/?path=%2ftmp%2Ffile.txt", nil), "USER_ID") require.Equal(t, http.StatusOK, recorder.Code) require.Equal(t, fmt.Sprintln("File: ", file), recorder.Body.String()) |