Skip to content

Commit

Permalink
Unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyC-za committed Mar 24, 2023
1 parent e0b39c2 commit 23c44ce
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/lib/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,19 @@ class ApplicationWithOwner < ActiveRecord::Base
end
expect(config.custom_access_token_attributes).to eq([:tenant_name])
end

it "removes unrecognized attributes" do
# Once for access_grant_model, and again for access_token_model.
expect(Rails.logger).to receive(:warn).with(/custom attribute will be ignored/)
expect(Rails.logger).to receive(:warn).with(/custom attribute will be ignored/)

Doorkeeper.configure do
orm DOORKEEPER_ORM
custom_access_token_attributes [:tenant_name, :unrecognized_attribute]
end

expect(config.custom_access_token_attributes).to eq([:tenant_name])
end
end

describe "application_secret_generator" do
Expand Down

0 comments on commit 23c44ce

Please sign in to comment.