Sha256: 2775a0c98b616b083b445878dfa722b96a2803f25f60466d7496a01f62b10707

Contents?: true

Size: 536 Bytes

Versions: 6

Compression:

Stored size: 536 Bytes

Contents

require 'rails_helper'

describe Admin::UserSessionsController, type: :controller do
  before(:each) do
    # activate_authlogic
    # SpudUserSession.create(FactoryBot.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 = FactoryBot.create(:spud_user)
      u.save
      get :new
      expect(response).to be_successful
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tb_core-1.5.4 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.5.3 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.5.2 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.5.1 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.5.0 spec/controllers/admin/user_sessions_controller_spec.rb
tb_core-1.4.8 spec/controllers/admin/user_sessions_controller_spec.rb