added spec for redirect to conversations_controller_spec
This commit is contained in:
parent
3c4b37dad7
commit
e4e1362ff5
1 changed files with 8 additions and 2 deletions
|
|
@ -138,11 +138,17 @@ describe ConversationsController do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'succeeds' do
|
it 'succeeds' do
|
||||||
get :show, :id => @conversation.id
|
get :show, :id => @conversation.id, :format => :js
|
||||||
response.should be_success
|
response.should be_success
|
||||||
assigns[:conversation].should == @conversation
|
assigns[:conversation].should == @conversation
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'redirects to index' do
|
||||||
|
get :show, :id => @conversation.id
|
||||||
|
response.should redirect_to(conversations_path(:conversation_id => @conversation.id))
|
||||||
|
assigns[:conversation].should == @conversation
|
||||||
|
end
|
||||||
|
|
||||||
it 'does not let you access conversations where you are not a recipient' do
|
it 'does not let you access conversations where you are not a recipient' do
|
||||||
sign_in :user, eve
|
sign_in :user, eve
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue