Skip to content

Commit

Permalink
[ci skip] Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
nbulaj committed Apr 1, 2019
1 parent ce1136d commit 6c869b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 0 additions & 2 deletions spec/lib/oauth/password_access_token_request_spec.rb
Expand Up @@ -157,8 +157,6 @@ module Doorkeeper::OAuth
222
elsif context.scopes.exists?("magic")
Float::INFINITY
else
nil
end
}
)
Expand Down
11 changes: 5 additions & 6 deletions spec/models/doorkeeper/application_spec.rb
Expand Up @@ -82,37 +82,36 @@ module Doorkeeper
expect(new_application).not_to be_valid
end

context 'redirect URI' do
context 'when grant flows allow blank redirect URI' do
context "redirect URI" do
context "when grant flows allow blank redirect URI" do
before do
Doorkeeper.configure do
grant_flows %w[password client_credentials]
end
end

it 'is valid without redirect_uri' do
it "is valid without redirect_uri" do
new_application.save
new_application.redirect_uri = nil
expect(new_application).to be_valid
end
end

context 'when grant flows require redirect URI' do
context "when grant flows require redirect URI" do
before do
Doorkeeper.configure do
grant_flows %w[password client_credentials authorization_code]
end
end

it 'is invalid without redirect_uri' do
it "is invalid without redirect_uri" do
new_application.save
new_application.redirect_uri = nil
expect(new_application).not_to be_valid
end
end
end


it "checks uniqueness of uid" do
app1 = FactoryBot.create(:application)
app2 = FactoryBot.create(:application)
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/applications/applications_request_spec.rb
Expand Up @@ -113,7 +113,7 @@
# Visit it once again to consider grant flows
visit "/oauth/applications/new"

i_should_see I18n.t('doorkeeper.applications.help.blank_redirect_uri')
i_should_see I18n.t("doorkeeper.applications.help.blank_redirect_uri")

fill_in "doorkeeper_application[name]", with: "My Application"
fill_in "doorkeeper_application[redirect_uri]",
Expand Down

0 comments on commit 6c869b9

Please sign in to comment.