Sha256: 75b78df3db9091f1ff280264d4f5fa6735683d84a1735d2858fc18b37718818d

Contents?: true

Size: 992 Bytes

Versions: 23

Compression:

Stored size: 992 Bytes

Contents

require 'spec_helper_integration'

feature 'Authorized applications' do
  background do
    @user   = User.create!(:name => "Joe", :password => "sekret")
    @client = client_exists(:name => "Amazing Client App")
    resource_owner_is_authenticated @user
    client_is_authorized @client, @user
  end

  scenario "display user's authorized applications" do
    visit '/oauth/authorized_applications'
    i_should_see 'Amazing Client App'
  end

  scenario "do not display other user's authorized applications" do
    client = client_exists(:name => "Another Client App")
    client_is_authorized client, User.create!(:name => "Joe", :password => "sekret")
    visit '/oauth/authorized_applications'
    i_should_not_see 'Another Client App'
  end

  scenario "user revoke access to application" do
    visit '/oauth/authorized_applications'
    i_should_see 'Amazing Client App'
    click_on 'Revoke'
    i_should_see 'Application revoked'
    i_should_not_see 'Amazing Client App'
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
doorkeeper-1.1.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-1.0.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-1.0.0.rc2 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-1.0.0.rc1 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.7.4 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.7.3 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.7.2 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.7.1 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.7.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.6.7 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.6.6 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.6.5 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.6.4 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.6.3 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.6.2 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.6.1 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.6.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.6.0.rc1 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.5.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-0.5.0.rc1 spec/requests/applications/authorized_applications_spec.rb