Commit 232ae06a authored by Sean McGivern's avatar Sean McGivern

Merge branch 'sh-fix-ee-issue-8871' into 'master'

Fix failing test in spec/workers/post_receive_spec.rb

Closes gitlab-ee#8871

See merge request gitlab-org/gitlab-ce!24993
parents c8fe0d6a 28c48804
No related merge requests found
......@@ -141,11 +141,18 @@ describe PostReceive do
let(:gl_repository) { "wiki-#{project.id}" }
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 }
.to change(project, :last_activity_at)
.and change(project, :last_repository_updated_at)
# MySQL drops milliseconds in the timestamps, so advance at least
# a second to ensure we see changes.
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
......
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