Sha256: 97df99bea935e42bcb4eebc03d14cb3da49e8144c4b5907ceb67fc9dc89cb0a9

Contents?: true

Size: 774 Bytes

Versions: 11

Compression:

Stored size: 774 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../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
      sign_in Factory(:user)
    end

    it "should render" do
      get :index
      assert_response :success
    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

11 entries across 11 versions & 2 rubygems

Version Path
social_stream-base-0.6.0 spec/controllers/home_controller_spec.rb
social_stream-base-0.5.2 spec/controllers/home_controller_spec.rb
social_stream-base-0.5.1 spec/controllers/home_controller_spec.rb
social_stream-base-0.5.0 spec/controllers/home_controller_spec.rb
social_stream-0.4.6 spec/controllers/home_controller_spec.rb
social_stream-0.4.5 spec/controllers/home_controller_spec.rb
social_stream-0.4.4 spec/controllers/home_controller_spec.rb
social_stream-0.4.3 spec/controllers/home_controller_spec.rb
social_stream-0.4.2 spec/controllers/home_controller_spec.rb
social_stream-0.4.1 spec/controllers/home_controller_spec.rb
social_stream-0.4.0 spec/controllers/home_controller_spec.rb