Sha256: 372a16da35bb87dc5c5d1984ca295d88fed16a2a92647efa683d189a394eaf3d

Contents?: true

Size: 740 Bytes

Versions: 16

Compression:

Stored size: 740 Bytes

Contents

require 'spec_helper'

describe "Controllers that use this engine", type: :controller do

  controller do
    before_filter :authenticate_user!
    def action_needing_authentication; end
  end

  it 'should not freak out for what rails thinks are weird formats' do
    # When accounts-rails intercepts a request to authenticate a user and that request
    # has what Rails sees as a weird format, e.g.:
    #   https://example.org/qa/271/section/4.6
    # it was freaking out.  This spec makes sure it handles that kind of request URL

    routes.draw { get "action_needing_authentication" => "anonymous#action_needing_authentication" }

    expect{
      get :action_needing_authentication, format: :'6'
    }.not_to raise_error
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
openstax_accounts-7.9.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.8.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.7.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.6.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.5.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.4.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.3.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.2.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.1.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.0.1 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-7.0.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-6.4.2 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-6.4.1 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-6.4.0 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-6.3.2 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb
openstax_accounts-6.3.1 spec/controllers/openstax/accounts/uses_this_engine_controller_spec.rb