diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-03-07 23:16:14 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-03-07 23:16:14 +0300 |
commit | c0c317038142b51e2599346f96afb7c18a63e10f (patch) | |
tree | c8a41a1598d6afda117cf989e41beffc91dc49f8 /spec/workers/post_receive_spec.rb | |
parent | 8033da7ae79699afdd16c0913899df57db19cc90 (diff) |
Update project activity when pushing to a wiki repository
Diffstat (limited to 'spec/workers/post_receive_spec.rb')
-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) |