From 202ef4fe55ea1d0993656a7cfff061511491eb65 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Tue, 23 Jul 2013 17:04:34 +0400 Subject: [PATCH] #226: rollback and fixed specs --- .../projects/pull_requests_controller_spec.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/spec/controllers/projects/pull_requests_controller_spec.rb b/spec/controllers/projects/pull_requests_controller_spec.rb index 2eff7d9bb..d9cda7f6e 100644 --- a/spec/controllers/projects/pull_requests_controller_spec.rb +++ b/spec/controllers/projects/pull_requests_controller_spec.rb @@ -96,7 +96,13 @@ end shared_examples_for 'user with pull request update rights' do it 'should be able to perform update action' do put :update, @update_params - response.should redirect_to(project_pull_request_path(@pull.to_project, @pull)) + response.should be_success + end + + it 'should be able to perform merge action' do + @pull.check + put :merge, @update_params + response.should be_success end let(:pull) { @project.pull_requests.find(@pull) } @@ -146,6 +152,13 @@ shared_examples_for 'user without pull request update rights' do put :update, @wrong_update_params pull.issue.body.should_not =='updating' end + + it 'should be able to perform merge action' do + @pull.check + put :merge, @update_params + response.should_not be_success + end + end shared_examples_for 'pull request when project with issues turned off' do