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