Sha256: a95b017cd4cb7c426f5adacf1d8d4ed28e55fcbba50b466bfb065225bcb6787f

Contents?: true

Size: 651 Bytes

Versions: 6

Compression:

Stored size: 651 Bytes

Contents

require 'spec_helper'

describe Curate::UserProfilesController do
  describe "#show" do
    context 'Person object exists' do
      let(:person) { FactoryGirl.create(:person_with_user) }
      before { sign_in person.user }
      it 'should redirect to profile page' do
        get :show
        response.should redirect_to person_path(person)
      end
    end

    context 'Person object does not exist' do
      let(:user) {FactoryGirl.create(:user) }
      before { sign_in user }
      it 'should redirect to user registration page' do
        get :show
        response.should redirect_to edit_user_registration_path
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
curate-0.6.6 spec/controllers/curate/user_profiles_controller_spec.rb
curate-0.6.5 spec/controllers/curate/user_profiles_controller_spec.rb
curate-0.6.4 spec/controllers/curate/user_profiles_controller_spec.rb
curate-0.6.3 spec/controllers/curate/user_profiles_controller_spec.rb
curate-0.6.1 spec/controllers/curate/user_profiles_controller_spec.rb
curate-0.6.0 spec/controllers/curate/user_profiles_controller_spec.rb