Sha256: cc46e426024e5193bae83d1404f9ea24a9d8ba4cb9d2615217e7753d5951602a

Contents?: true

Size: 778 Bytes

Versions: 22

Compression:

Stored size: 778 Bytes

Contents

module Symphonia
  RSpec.describe AdminController do
    routes { Symphonia::Engine.routes }

    context 'no user' do

      it '#index' do
        get :index
        expect(response).to redirect_to login_path
      end

      it '#test_mail' do
        get :test_mail
        expect(response).to redirect_to login_path
      end

    end

    context 'logged in', logged: true do
      include ActiveJob::TestHelper

      it '#index' do
        get :index
        expect(response).to have_http_status :success
      end

      it '#test_mail' do
        Rails.application.config.action_mailer.delivery_method = :test
        expect { get :test_mail }.to have_enqueued_job.on_queue('mailers')
        expect(response).to have_http_status :redirect
      end

    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
symphonia-3.4.0 spec/controllers/admin_controller_spec.rb
symphonia-3.3.4 spec/controllers/admin_controller_spec.rb
symphonia-3.3.3 spec/controllers/admin_controller_spec.rb
symphonia-3.3.2 spec/controllers/admin_controller_spec.rb
symphonia-3.3.0 spec/controllers/admin_controller_spec.rb
symphonia-3.2.4 spec/controllers/admin_controller_spec.rb
symphonia-3.2.3 spec/controllers/admin_controller_spec.rb
symphonia-3.2.2 spec/controllers/admin_controller_spec.rb
symphonia-3.2.1 spec/controllers/admin_controller_spec.rb
symphonia-3.1.5 spec/controllers/admin_controller_spec.rb
symphonia-3.1.4 spec/controllers/admin_controller_spec.rb
symphonia-3.1.3 spec/controllers/admin_controller_spec.rb
symphonia-3.1.2 spec/controllers/admin_controller_spec.rb
symphonia-3.1.1 spec/controllers/admin_controller_spec.rb
symphonia-3.1.0 spec/controllers/admin_controller_spec.rb
symphonia-3.0.3 spec/controllers/admin_controller_spec.rb
symphonia-3.0.2 spec/controllers/admin_controller_spec.rb
symphonia-2.2.1 spec/controllers/admin_controller_spec.rb
symphonia-3.0.1 spec/controllers/admin_controller_spec.rb
symphonia-3.0.0 spec/controllers/admin_controller_spec.rb