mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-28 11:14:54 -04:00
chore: add integration testing
Starring was one of such examples where language was previously not loaded.
This commit is contained in:
parent
1d526d365e
commit
e7dddaee75
2 changed files with 19 additions and 0 deletions
17
models/fixtures/language_stat.yml
Normal file
17
models/fixtures/language_stat.yml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-
|
||||
id: 1
|
||||
repo_id: 1
|
||||
commit_id: 65f1bf27bc3bf70f64657658635e66094edbcb4d
|
||||
is_primary: true
|
||||
language: 'Go'
|
||||
size: 1023
|
||||
created_unix: 1779733547
|
||||
|
||||
-
|
||||
id: 2
|
||||
repo_id: 1
|
||||
commit_id: 65f1bf27bc3bf70f64657658635e66094edbcb4d
|
||||
is_primary: false
|
||||
language: 'PHP'
|
||||
size: 1
|
||||
created_unix: 1779733547
|
||||
|
|
@ -63,6 +63,7 @@ func TestAPIStar(t *testing.T) {
|
|||
DecodeJSON(t, resp, &repos)
|
||||
assert.Len(t, repos, 1)
|
||||
assert.Equal(t, repo, repos[0].FullName)
|
||||
assert.Equal(t, "Go", repos[0].Language)
|
||||
|
||||
t.Run("disabled stars", func(t *testing.T) {
|
||||
assertDisabledStarsNotFound(t, req)
|
||||
|
|
@ -82,6 +83,7 @@ func TestAPIStar(t *testing.T) {
|
|||
DecodeJSON(t, resp, &repos)
|
||||
assert.Len(t, repos, 1)
|
||||
assert.Equal(t, repo, repos[0].FullName)
|
||||
assert.Equal(t, "Go", repos[0].Language)
|
||||
|
||||
t.Run("disabled stars", func(t *testing.T) {
|
||||
assertDisabledStarsNotFound(t, req)
|
||||
|
|
|
|||
Loading…
Reference in a new issue