Sha256: f3769bad4e7a6501648a3847cfe5aa353b91dce214398dd2c1eb12b6d76b0370

Contents?: true

Size: 993 Bytes

Versions: 27

Compression:

Stored size: 993 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

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

27 entries across 27 versions & 3 rubygems

Version Path
doorkeeper-mongodb-5.3.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-mongodb-5.2.3 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-sequel-2.4.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.1.2 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-mongodb-5.2.2 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-sequel-2.3.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.2.6 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.3.3 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.1.1 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.2.5 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.3.2 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.4.0.rc1 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-mongodb-5.2.1 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-mongodb-5.2.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-sequel-2.2.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.2.4 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.3.1 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.3.0 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.2.3 spec/requests/applications/authorized_applications_spec.rb
doorkeeper-5.2.2 spec/requests/applications/authorized_applications_spec.rb