Update project activity when pushing to a wiki repository

parent 8033da7a
...@@ -55,7 +55,7 @@ class PostReceive ...@@ -55,7 +55,7 @@ class PostReceive
end end
def process_wiki_changes(post_received) def process_wiki_changes(post_received)
# Nothing defined here yet. post_received.project.touch(:last_activity_at, :last_repository_updated_at)
end end
def log(message) def log(message)
......
...@@ -114,6 +114,18 @@ describe PostReceive do ...@@ -114,6 +114,18 @@ describe PostReceive do
end end
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 context "webhook" do
it "fetches the correct project" do it "fetches the correct project" do
expect(Project).to receive(:find_by).with(id: project.id.to_s) expect(Project).to receive(:find_by).with(id: project.id.to_s)
......
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