Sha256: 6201083538fd58fe89dae34daf930430695eba23c8327cdf5aafd75d27d3b5aa

Contents?: true

Size: 1013 Bytes

Versions: 10

Compression:

Stored size: 1013 Bytes

Contents

require 'spec_helper_integration'

feature 'Implicit Grant Flow Errors' do
  background do
    config_is_set(:authenticate_resource_owner) { User.first || redirect_to('/sign_in') }
    config_is_set(:grant_flows, ["implicit"])
    client_exists
    create_resource_owner
    sign_in
  end

  after do
    access_token_should_not_exist
  end

  [
    [:client_id,     :invalid_client],
    [:redirect_uri,  :invalid_redirect_uri]
  ].each do |error|
    scenario "displays #{error.last} error for invalid #{error.first}" do
      visit authorization_endpoint_url(client: @client, error.first => 'invalid', response_type: 'token')
      i_should_not_see 'Authorize'
      i_should_see_translated_error_message error.last
    end

    scenario "displays #{error.last} error when #{error.first} is missing" do
      visit authorization_endpoint_url(client: @client, error.first => '', response_type: 'token')
      i_should_not_see 'Authorize'
      i_should_see_translated_error_message error.last
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
doorkeeper-mongodb-4.2.0 spec/requests/flows/implicit_grant_errors_spec.rb
doorkeeper-sequel-1.5.0 spec/requests/flows/implicit_grant_errors_spec.rb
doorkeeper-4.4.3 spec/requests/flows/implicit_grant_errors_spec.rb
doorkeeper-4.4.2 spec/requests/flows/implicit_grant_errors_spec.rb
doorkeeper-4.4.1 spec/requests/flows/implicit_grant_errors_spec.rb
doorkeeper-4.4.0 spec/requests/flows/implicit_grant_errors_spec.rb
doorkeeper-mongodb-4.1.0 spec/requests/flows/implicit_grant_errors_spec.rb
doorkeeper-4.3.2 spec/requests/flows/implicit_grant_errors_spec.rb
doorkeeper-4.3.1 spec/requests/flows/implicit_grant_errors_spec.rb
doorkeeper-4.3.0 spec/requests/flows/implicit_grant_errors_spec.rb