diff --git a/tests/integration/api_repo_get_contents_test.go b/tests/integration/api_repo_get_contents_test.go index bedc1dcfa5..8c03fb2d5d 100644 --- a/tests/integration/api_repo_get_contents_test.go +++ b/tests/integration/api_repo_get_contents_test.go @@ -197,13 +197,13 @@ func TestAPIGetContentsRefFormats(t *testing.T) { resp = MakeRequest(t, NewRequest(t, http.MethodGet, fileWith40c), http.StatusOK) raw, err = io.ReadAll(resp.Body) assert.NoError(t, err) - assert.EqualValues(t, "# test\n", string(raw)) + assert.EqualValues(t, "# a_file_path_with_40_characters_for_tests\n", string(raw)) // Test with a filepath with 40 characters and name is a commit SHA fileWith40c = setting.AppURL + "api/v1/repos/user13/repo11/raw/" + "65f1bf27bc3bf70f64657658635e66094edbcb4d" resp = MakeRequest(t, NewRequest(t, http.MethodGet, fileWith40c), http.StatusOK) raw, err = io.ReadAll(resp.Body) assert.NoError(t, err) - assert.EqualValues(t, "# 65f1bf27bc3bf70f64657658635e66094edbcb4d\n", string(raw)) + assert.EqualValues(t, "# test\n", string(raw)) }) }