DEV: Bump rubocop-discourse (#71)

* DEV: Bump rubocop-discourse

* Fix rubocop violations
This commit is contained in:
David Taylor 2022-10-03 21:20:41 +01:00 committed by GitHub
parent c95e92554c
commit 2efe6578ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 15 deletions

View File

@ -2,30 +2,32 @@ GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
json (2.6.2)
parallel (1.22.1)
parser (3.1.2.0)
parser (3.1.2.1)
ast (~> 2.4.1)
rainbow (3.1.1)
regexp_parser (2.5.0)
regexp_parser (2.6.0)
rexml (3.2.5)
rubocop (1.30.1)
rubocop (1.36.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.0.0)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.18.0, < 2.0)
rubocop-ast (>= 1.20.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.18.0)
rubocop-ast (1.21.0)
parser (>= 3.1.1.0)
rubocop-discourse (2.5.0)
rubocop-discourse (3.0)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.11.1)
rubocop (~> 1.19)
rubocop-rspec (2.13.2)
rubocop (~> 1.33)
ruby-progressbar (1.11.0)
unicode-display_width (2.1.0)
unicode-display_width (2.3.0)
PLATFORMS
arm64-darwin-20

View File

@ -3,7 +3,7 @@
require 'rails_helper'
describe OAuth2BasicAuthenticator do
context 'after_authenticate' do
describe 'after_authenticate' do
let(:user) { Fabricate(:user) }
let(:authenticator) { OAuth2BasicAuthenticator.new }
@ -57,7 +57,7 @@ describe OAuth2BasicAuthenticator do
expect(result.email_valid).to eq(false)
end
context "fetch_user_details" do
describe "fetch_user_details" do
before(:each) do
SiteSetting.oauth2_fetch_user_details = true
SiteSetting.oauth2_user_json_url = "https://provider.com/user"
@ -126,7 +126,7 @@ describe OAuth2BasicAuthenticator do
end
end
context 'avatar downloading' do
describe 'avatar downloading' do
before do
SiteSetting.queue_jobs = true
SiteSetting.oauth2_fetch_user_details = true
@ -165,7 +165,7 @@ describe OAuth2BasicAuthenticator do
auth_result = nil
expect {
auth_result = authenticator.after_authenticate(auth)
}.to change { job_klass.jobs.count }.by(0)
}.not_to change { job_klass.jobs.count }
expect {
authenticator.after_create_account(user, auth_result)
@ -258,7 +258,7 @@ describe OAuth2BasicAuthenticator do
expect(result).to eq 'http://example.com/1.png'
end
context 'token_callback' do
describe 'token_callback' do
let(:user) { Fabricate(:user) }
let(:strategy) { OmniAuth::Strategies::Oauth2Basic.new({}) }
let(:authenticator) { OAuth2BasicAuthenticator.new }