summaryrefslogtreecommitdiff
path: root/spec/features/dashboard
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-03-03 05:59:40 -0800
committerStan Hu <stanhu@gmail.com>2018-03-05 19:11:50 -0800
commit9cb7e93f09b1ff0c1c889a004479a8ef21abbae2 (patch)
tree00a0c5f114a481b19de02767ebba16fb9521c474 /spec/features/dashboard
parent8a0052c037f025b64159ca8cfe0d3451261c1edb (diff)
downloadgitlab-ce-9cb7e93f09b1ff0c1c889a004479a8ef21abbae2.tar.gz
Fix project dashboard showing the wrong timestampssh-dashboard-sort-fix
Use the max of the `last_activity_at` and `last_repository_updated_at` columns. The latter is updated only when a push happens, but the former is updated whenever any activity (e.g. issue creation) happens. Closes #27181
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r--spec/features/dashboard/projects_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index 586c7b48d0b..986f864f0b5 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -37,6 +37,14 @@ feature 'Dashboard Projects' do
expect(page).to have_xpath("//time[@datetime='#{project.last_repository_updated_at.getutc.iso8601}']")
end
+
+ it 'shows the last_activity_at attribute as the update date' do
+ project.update_attributes!(last_repository_updated_at: 1.hour.ago, last_activity_at: Time.now)
+
+ visit dashboard_projects_path
+
+ expect(page).to have_xpath("//time[@datetime='#{project.last_activity_at.getutc.iso8601}']")
+ end
end
context 'when last_repository_updated_at and last_activity_at are missing' do