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
|
|
@ -136,13 +136,19 @@ describe ConversationsController do
|
|||
}
|
||||
@conversation = Conversation.create(hash)
|
||||
end
|
||||
|
||||
|
||||
it 'succeeds' do
|
||||
get :show, :id => @conversation.id
|
||||
get :show, :id => @conversation.id, :format => :js
|
||||
response.should be_success
|
||||
assigns[:conversation].should == @conversation
|
||||
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
|
||||
sign_in :user, eve
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue