Skip to content

Commit 4f6f2df

Browse files
committed
Fix reference error in test file
1 parent 511c63f commit 4f6f2df

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

services/repository/contributors_graph_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414

1515
"gitea.com/go-chi/cache"
1616
"github.com/stretchr/testify/assert"
17+
api "code.gitea.io/gitea/modules/structs"
1718
)
1819

1920
func TestRepository_ContributorsGraph(t *testing.T) {
@@ -32,7 +33,7 @@ func TestRepository_ContributorsGraph(t *testing.T) {
3233
assert.ErrorAs(t, err, &git.ErrNotExist{})
3334

3435
generateContributorStats(nil, mockCache, "key2", repo, "master")
35-
data, isData := mockCache.Get("key2").(map[string]*ContributorData)
36+
data, isData := mockCache.Get("key2").(map[string]*api.ContributorData)
3637
assert.True(t, isData)
3738
var keys []string
3839
for k := range data {
@@ -46,11 +47,11 @@ func TestRepository_ContributorsGraph(t *testing.T) {
4647
"total", // generated summary
4748
}, keys)
4849

49-
assert.EqualValues(t, &ContributorData{
50+
assert.EqualValues(t, &api.ContributorData{
5051
Name: "Ethan Koenig",
5152
AvatarLink: "https://secure.gravatar.com/avatar/b42fb195faa8c61b8d88abfefe30e9e3?d=identicon",
5253
TotalCommits: 1,
53-
Weeks: map[int64]*WeekData{
54+
Weeks: map[int64]*api.WeekData{
5455
1511654400000: {
5556
Week: 1511654400000, // sunday 2017-11-26
5657
Additions: 3,
@@ -59,11 +60,11 @@ func TestRepository_ContributorsGraph(t *testing.T) {
5960
},
6061
},
6162
}, data["[email protected]"])
62-
assert.EqualValues(t, &ContributorData{
63+
assert.EqualValues(t, &api.ContributorData{
6364
Name: "Total",
6465
AvatarLink: "",
6566
TotalCommits: 3,
66-
Weeks: map[int64]*WeekData{
67+
Weeks: map[int64]*api.WeekData{
6768
1511654400000: {
6869
Week: 1511654400000, // sunday 2017-11-26 (2017-11-26 20:31:18 -0800)
6970
Additions: 3,

0 commit comments

Comments
 (0)