Sha256: bb9bb9229b04bd566f6a9d3d3dcf888ea4a9de7be4206e107ee4d56794ba62cd

Contents?: true

Size: 437 Bytes

Versions: 38

Compression:

Stored size: 437 Bytes

Contents

class DummyController < ::ApplicationController
  include Symphonia::ControllerExtensions
  before_action :require_admin
end

RSpec.describe ::DummyController, type: :controller do

  controller do
    def admin_action
      raise StandardError
    end
  end

  it "redirect to login form" do
    routes.draw { get "admin_action", to: "dummy#admin_action" }
    get :admin_action
    expect(response).to redirect_to("/login")
  end

end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
symphonia-6.0.5 spec/controllers/login_controller_spec.rb
symphonia-6.0.2 spec/controllers/login_controller_spec.rb
symphonia-6.0.1 spec/controllers/login_controller_spec.rb
symphonia-6.0.0 spec/controllers/login_controller_spec.rb
symphonia-5.0.6 spec/controllers/login_controller_spec.rb
symphonia-5.0.5 spec/controllers/login_controller_spec.rb
symphonia-5.0.4 spec/controllers/login_controller_spec.rb
symphonia-5.0.3 spec/controllers/login_controller_spec.rb
symphonia-5.0.0 spec/controllers/login_controller_spec.rb
symphonia-4.2.0 spec/controllers/login_controller_spec.rb
symphonia-4.1.3 spec/controllers/login_controller_spec.rb
symphonia-4.1.2 spec/controllers/login_controller_spec.rb
symphonia-4.1.1 spec/controllers/login_controller_spec.rb
symphonia-4.1.0 spec/controllers/login_controller_spec.rb
symphonia-4.0.1 spec/controllers/login_controller_spec.rb
symphonia-4.0.0 spec/controllers/login_controller_spec.rb
symphonia-3.4.0 spec/controllers/login_controller_spec.rb
symphonia-3.3.4 spec/controllers/login_controller_spec.rb
symphonia-3.3.3 spec/controllers/login_controller_spec.rb
symphonia-3.3.2 spec/controllers/login_controller_spec.rb