diff options
author | Stan Hu <stanhu@gmail.com> | 2018-03-08 00:40:16 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-03-08 00:40:16 +0300 |
commit | fa797c42edc6f0eca6d5640231270c15fd59dad9 (patch) | |
tree | 84912fdf4b92e4f599a2cdb66b6b91d6db5173ab /spec | |
parent | 1804b3dc0d491a369ef2b05e3ac1ac867c308cc5 (diff) | |
parent | c0c317038142b51e2599346f96afb7c18a63e10f (diff) |
Merge branch 'da-update-project-activity' into 'master'
Update project activity when pushing to a wiki repository
See merge request gitlab-org/gitlab-ce!17621
Diffstat (limited to 'spec')
-rw-r--r-- | spec/workers/post_receive_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/workers/post_receive_spec.rb b/spec/workers/post_receive_spec.rb index 5d9b0679796..cd6661f09a1 100644 --- a/spec/workers/post_receive_spec.rb +++ b/spec/workers/post_receive_spec.rb @@ -114,6 +114,18 @@ describe PostReceive do end end + describe '#process_wiki_changes' do + let(:gl_repository) { "wiki-#{project.id}" } + + it 'updates project activity' do + described_class.new.perform(gl_repository, key_id, base64_changes) + + expect { project.reload } + .to change(project, :last_activity_at) + .and change(project, :last_repository_updated_at) + end + end + context "webhook" do it "fetches the correct project" do expect(Project).to receive(:find_by).with(id: project.id.to_s) |