diff --git a/models/fixtures/language_stat.yml b/models/fixtures/language_stat.yml new file mode 100644 index 0000000000..e18ce8c496 --- /dev/null +++ b/models/fixtures/language_stat.yml @@ -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 diff --git a/tests/integration/api_user_star_test.go b/tests/integration/api_user_star_test.go index 1e6b4400ae..ce0b24d0e3 100644 --- a/tests/integration/api_user_star_test.go +++ b/tests/integration/api_user_star_test.go @@ -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)