Commit 6f387678 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 95ed999b 232ae06a
...@@ -141,11 +141,18 @@ describe PostReceive do ...@@ -141,11 +141,18 @@ describe PostReceive do
let(:gl_repository) { "wiki-#{project.id}" } let(:gl_repository) { "wiki-#{project.id}" }
it 'updates project activity' do it 'updates project activity' do
described_class.new.perform(gl_repository, key_id, base64_changes) # Force Project#set_timestamps_for_create to initialize timestamps
project
expect { project.reload } # MySQL drops milliseconds in the timestamps, so advance at least
.to change(project, :last_activity_at) # a second to ensure we see changes.
.and change(project, :last_repository_updated_at) Timecop.freeze(1.second.from_now) do
expect do
described_class.new.perform(gl_repository, key_id, base64_changes)
project.reload
end.to change(project, :last_activity_at)
.and change(project, :last_repository_updated_at)
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment