Sha256: 4ac7b579297b2e8de20057688b07c22d3c916d46c356495d929bb0eaeda3c0cd
Contents?: true
Size: 1.09 KB
Versions: 149
Compression:
Stored size: 1.09 KB
Contents
require 'spec_helper' describe HomeController do include SocialStream::TestHelpers render_views describe "when Anonymous" do it "should redirect to login" do get :index response.should redirect_to(new_user_session_path) end end describe "when authenticated" do before do @user = Factory(:user) sign_in @user end it "should render" do get :index response.should be_success response.body.should =~ /activities_share_btn/ end context "with a group" do before do Factory(:friend, :contact => Factory(:g2g_contact, :sender => @user.actor)) end it "should render" do get :index response.should be_success response.body.should =~ /activities_share_btn/ end end describe "when representing" do before do @represented = represent(Factory(:group)) end it "should render represented home" do get :index assert_response :success assigns(:current_subject).should == @represented end end end end
Version data entries
149 entries across 149 versions & 4 rubygems