mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-24 08:57:03 -05:00
Merge pull request 'services/convert: Convert a Repository's ObjectFormatName too' (#3464) from algernon/forgejo:i-object-exclamationmark-format-name into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3464 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
c864448dc9
2 changed files with 12 additions and 0 deletions
|
@ -237,6 +237,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
|
||||||
MirrorInterval: mirrorInterval,
|
MirrorInterval: mirrorInterval,
|
||||||
MirrorUpdated: mirrorUpdated,
|
MirrorUpdated: mirrorUpdated,
|
||||||
RepoTransfer: transfer,
|
RepoTransfer: transfer,
|
||||||
|
ObjectFormatName: repo.ObjectFormatName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -701,3 +701,14 @@ func TestAPIRepoGetAssignees(t *testing.T) {
|
||||||
DecodeJSON(t, resp, &assignees)
|
DecodeJSON(t, resp, &assignees)
|
||||||
assert.Len(t, assignees, 1)
|
assert.Len(t, assignees, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestAPIViewRepoObjectFormat(t *testing.T) {
|
||||||
|
defer tests.PrepareTestEnv(t)()
|
||||||
|
|
||||||
|
var repo api.Repository
|
||||||
|
|
||||||
|
req := NewRequest(t, "GET", "/api/v1/repos/user2/repo1")
|
||||||
|
resp := MakeRequest(t, req, http.StatusOK)
|
||||||
|
DecodeJSON(t, resp, &repo)
|
||||||
|
assert.EqualValues(t, "sha1", repo.ObjectFormatName)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue