Sha256: c04c6f934309feacf4cc04bb1cb6b11cb0db2fe4bcfea3a9896d20297e43569d
Contents?: true
Size: 889 Bytes
Versions: 5
Compression:
Stored size: 889 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe ContactsController do render_views before do sign_in Factory(:friend).sender_subject end describe "GET 'index'" do it "should be successful" do get 'index' response.should be_success end end describe "when authenticated" do before do @user = Factory(:user) sign_in @user end it "should render edit" do get :edit, :id => Factory(:user).actor_id assert_response :success end it "should render update" do contact = Factory(:user) put :update, :id => contact.actor_id, :contact => { "relation_ids" => [ "gotcha", @user.relations.first.id ] } response.should redirect_to(contact) @user.sent_ties.received_by(contact).first.relation.should == @user.relations.first end end end
Version data entries
5 entries across 5 versions & 2 rubygems