summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-10-21 21:19:53 +0100
committerGitHub <noreply@github.com>2019-10-21 21:19:53 +0100
commitb59a9053941b2762f0dc514fdb05b51d74784b5b (patch)
treedcfcacbb477d57dc71134b5e54eaa6783e934694 /models
parent41c7aa5a3ae7ac0e568ad2267ed76fd0681d0489 (diff)
downloadgitea-b59a9053941b2762f0dc514fdb05b51d74784b5b.tar.gz
gitea-b59a9053941b2762f0dc514fdb05b51d74784b5b.zip
Update heatmap fixtures to restore tests (#8615)
* Update heatmap fixtures to restore tests * Add hint to check the fixture age on fail
Diffstat (limited to 'models')
-rw-r--r--models/fixtures/action.yml2
-rw-r--r--models/user_heatmap_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/models/fixtures/action.yml b/models/fixtures/action.yml
index 34a1a8b2be..e8a6d531f2 100644
--- a/models/fixtures/action.yml
+++ b/models/fixtures/action.yml
@@ -5,7 +5,7 @@
act_user_id: 2
repo_id: 2
is_private: true
- created_unix: 1540139562
+ created_unix: 1571686356
-
id: 2
diff --git a/models/user_heatmap_test.go b/models/user_heatmap_test.go
index a71202d857..f882b35247 100644
--- a/models/user_heatmap_test.go
+++ b/models/user_heatmap_test.go
@@ -17,7 +17,7 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
CountResult int
JSONResult string
}{
- {2, 1, `[{"timestamp":1540080000,"contributions":1}]`},
+ {2, 1, `[{"timestamp":1571616000,"contributions":1}]`},
{3, 0, `[]`},
}
// Prepare
@@ -41,7 +41,7 @@ func TestGetUserHeatmapDataByUser(t *testing.T) {
// Get the heatmap and compare
heatmap, err := GetUserHeatmapDataByUser(user)
assert.NoError(t, err)
- assert.Equal(t, len(actions), len(heatmap))
+ assert.Equal(t, len(actions), len(heatmap), "invalid action count: did the test data became too old?")
assert.Equal(t, tc.CountResult, len(heatmap))
//Test JSON rendering