Commit e228dae8769d67e7539fd0bf1475d85c0244aa8d

Authored by Dmitriy Zaporozhets
1 parent 1d156c9c

Fix spec/workers/post_receive_spec.rb

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
spec/workers/post_receive_spec.rb
@@ -14,7 +14,7 @@ describe PostReceive do @@ -14,7 +14,7 @@ describe PostReceive do
14 let(:key_id) { key.identifier } 14 let(:key_id) { key.identifier }
15 15
16 it "fetches the correct project" do 16 it "fetches the correct project" do
17 - Project.should_receive(:find_by_path).with(project.path_with_namespace).and_return(project) 17 + Project.should_receive(:find_with_namespace).with(project.path_with_namespace).and_return(project)
18 PostReceive.perform(pwd(project), 'sha-old', 'sha-new', 'refs/heads/master', key_id) 18 PostReceive.perform(pwd(project), 'sha-old', 'sha-new', 'refs/heads/master', key_id)
19 end 19 end
20 20
@@ -28,7 +28,7 @@ describe PostReceive do @@ -28,7 +28,7 @@ describe PostReceive do
28 end 28 end
29 29
30 it "asks the project to trigger all hooks" do 30 it "asks the project to trigger all hooks" do
31 - Project.stub(find_by_path: project) 31 + Project.stub(find_with_namespace: project)
32 project.should_receive(:execute_hooks) 32 project.should_receive(:execute_hooks)
33 project.should_receive(:execute_services) 33 project.should_receive(:execute_services)
34 project.should_receive(:update_merge_requests) 34 project.should_receive(:update_merge_requests)