Browse Source

Update heatmap fixtures to restore tests (#13224) (#13226)

`the hotfix day`
tags/v1.12.6
6543 3 years ago
parent
commit
9f9a53e361
No account linked to committer's email address

+ 1
- 1
integrations/api_user_heatmap_test.go View File

var heatmap []*models.UserHeatmapData var heatmap []*models.UserHeatmapData
DecodeJSON(t, resp, &heatmap) DecodeJSON(t, resp, &heatmap)
var dummyheatmap []*models.UserHeatmapData var dummyheatmap []*models.UserHeatmapData
dummyheatmap = append(dummyheatmap, &models.UserHeatmapData{Timestamp: 1571616000, Contributions: 1})
dummyheatmap = append(dummyheatmap, &models.UserHeatmapData{Timestamp: 1603152000, Contributions: 1})


assert.Equal(t, dummyheatmap, heatmap) assert.Equal(t, dummyheatmap, heatmap)
} }

+ 1
- 1
models/fixtures/action.yml View File

act_user_id: 2 act_user_id: 2
repo_id: 2 repo_id: 2
is_private: true is_private: true
created_unix: 1571686356
created_unix: 1603228283


- -
id: 2 id: 2

+ 1
- 1
models/user_heatmap_test.go View File

CountResult int CountResult int
JSONResult string JSONResult string
}{ }{
{2, 1, `[{"timestamp":1571616000,"contributions":1}]`},
{2, 1, `[{"timestamp":1603152000,"contributions":1}]`},
{3, 0, `[]`}, {3, 0, `[]`},
} }
// Prepare // Prepare

Loading…
Cancel
Save