added spec for redirect to conversations_controller_spec

This commit is contained in:
Diaspora Europe 2012-02-08 16:22:09 +01:00
parent 3c4b37dad7
commit e4e1362ff5

View file

@ -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