Sha256: 1a4dd9cf57e54ece50b65fee74ed08707b6c81b7566b8c9dc23068a56741b2ea

Contents?: true

Size: 538 Bytes

Versions: 6

Compression:

Stored size: 538 Bytes

Contents

require 'rails_helper'

describe Admin::UserSessionsController, :type => :controller do
  before(:each) do
    # activate_authlogic
    # SpudUserSession.create(FactoryGirl.build(:spud_user))
  end

  describe 'new' do
    it "should redirect to setup url if no users exist" do
      get :new
      expect(response).to redirect_to(admin_setup_path)
    end

    it "should render login form if users do exist" do
      u = FactoryGirl.create(:spud_user)
      u.save
      get :new
      expect(response).to be_success
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tb_core-1.3.10 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.3.9 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.3.7 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.3.6 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.3.5 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.3.4 spec/controllers/admin/user_sessions_controller_spec.rb