diff options
author | Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> | 2020-05-31 00:58:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-31 01:58:55 +0300 |
commit | 9d652002c63d03d44083c4410881a457a9390e2f (patch) | |
tree | 6e3d7c37add64a2d4e51f2b3a930ee16ec0c5533 /modules/indexer | |
parent | ea4c139cd2f7e5174627a40aa8a9973fabf508ff (diff) | |
download | gitea-9d652002c63d03d44083c4410881a457a9390e2f.tar.gz gitea-9d652002c63d03d44083c4410881a457a9390e2f.zip |
Fix language stat calculation (#11692)
* Fix language stat calculation
* Group languages and ignore 0 size files
* remove unneeded code
Diffstat (limited to 'modules/indexer')
-rw-r--r-- | modules/indexer/stats/indexer_test.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/indexer/stats/indexer_test.go b/modules/indexer/stats/indexer_test.go index b60c6d9bb4..4bcbaa9423 100644 --- a/modules/indexer/stats/indexer_test.go +++ b/modules/indexer/stats/indexer_test.go @@ -39,7 +39,5 @@ func TestRepoStatsIndex(t *testing.T) { assert.Equal(t, "65f1bf27bc3bf70f64657658635e66094edbcb4d", status.CommitSha) langs, err := repo.GetTopLanguageStats(5) assert.NoError(t, err) - assert.Len(t, langs, 1) - assert.Equal(t, "other", langs[0].Language) - assert.Equal(t, float32(100), langs[0].Percentage) + assert.Empty(t, langs) } |