Sha256: e5d2566dfc7cb085195655b94da2a038b9596c208973f3ad36a03b318e2428ea

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

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') }
    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.inspect} error for invalid #{error.first.inspect}" 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.inspect} error when #{error.first.inspect} 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

1 entries across 1 versions & 1 rubygems

Version Path
couchkeeper-0.6.7 spec/requests/flows/implicit_grant_errors_spec.rb