mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Fix test
This commit is contained in:
parent
3230afdf6a
commit
09c7c906e9
@ -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))
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user