Fix TestListWithUnexpectedFiles test

The test should test both API versions.
This commit is contained in:
Michael Eischer
2023-06-17 21:57:58 +02:00
parent 84a8b210f5
commit 9557efad55

View File

@@ -422,7 +422,9 @@ func TestListWithUnexpectedFiles(t *testing.T) {
for i := 1; i <= 2; i++ {
req := newRequest(t, "GET", "/data/", nil)
req.Header.Set("Accept", "application/vnd.x.restic.rest.v2")
if i == 2 {
req.Header.Set("Accept", "application/vnd.x.restic.rest.v2")
}
checkRequest(t, mux.ServeHTTP, req,
[]wantFunc{wantCode(http.StatusOK)})