From 0ad9374ad1c6168ddd26feae36b2b3a5d9dfe3ab Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Thu, 27 Sep 2012 14:50:45 +0600 Subject: [PATCH] [refs #616] fixed comments spec --- .../projects/comments_controller_for_commit_spec.rb | 4 ++-- spec/controllers/projects/comments_controller_spec.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/controllers/projects/comments_controller_for_commit_spec.rb b/spec/controllers/projects/comments_controller_for_commit_spec.rb index 7555d5a79..d3a364218 100644 --- a/spec/controllers/projects/comments_controller_for_commit_spec.rb +++ b/spec/controllers/projects/comments_controller_for_commit_spec.rb @@ -19,7 +19,7 @@ end shared_examples_for 'user with update own comment rights for commits' do it 'should be able to perform update action' do put :update, {:id => @own_comment.id}.merge(@update_params) - response.should redirect_to(commit_path(@project, @commit.id)) + response.status.should == 200 end it 'should update subscribe body' do @@ -31,7 +31,7 @@ end shared_examples_for 'user with update stranger comment rights for commits' do it 'should be able to perform update action' do put :update, {:id => @stranger_comment.id}.merge(@update_params) - response.should redirect_to(commit_path(@project, @commit.id)) + response.status.should == 200 end it 'should update comment title' do diff --git a/spec/controllers/projects/comments_controller_spec.rb b/spec/controllers/projects/comments_controller_spec.rb index 3fb36a7cd..97a55982f 100644 --- a/spec/controllers/projects/comments_controller_spec.rb +++ b/spec/controllers/projects/comments_controller_spec.rb @@ -11,7 +11,7 @@ shared_context "comments controller" do @user = FactoryGirl.create(:user) @own_comment = FactoryGirl.create(:comment, :commentable => @issue, :user => @user, :project_id => @project.id) - + set_session_for(@user) @address = {:owner_name => @project.owner.uname, :project_name => @project.name, :issue_id => @issue.serial_id} @@ -35,7 +35,7 @@ end shared_examples_for 'user with update own comment rights' do it 'should be able to perform update action' do put :update, {:id => @own_comment.id}.merge(@update_params) - response.should redirect_to([@project, @issue]) + response.status.should == 200 end it 'should update comment body' do @@ -47,7 +47,7 @@ end shared_examples_for 'user with update stranger comment rights' do it 'should be able to perform update action' do put :update, {:id => @comment.id}.merge(@update_params) - response.should redirect_to([@project, @issue]) + response.status.should == 200 end it 'should update comment body' do