Skip to content

Commit afd8081

Browse files
committed
Linting
1 parent e3d3de5 commit afd8081

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

.rubocop_todo.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2021-02-14 08:34:14 UTC using RuboCop version 1.9.1.
3+
# on 2021-03-21 02:34:29 UTC using RuboCop version 1.11.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -34,7 +34,7 @@ Lint/NestedMethodDefinition:
3434
# Offense count: 1
3535
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
3636
Metrics/AbcSize:
37-
Max: 42
37+
Max: 30
3838

3939
# Offense count: 1
4040
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
@@ -45,22 +45,17 @@ Metrics/BlockLength:
4545
# Offense count: 1
4646
# Configuration parameters: CountComments, CountAsOne.
4747
Metrics/ClassLength:
48-
Max: 140
49-
50-
# Offense count: 1
51-
# Configuration parameters: IgnoredMethods.
52-
Metrics/CyclomaticComplexity:
53-
Max: 9
48+
Max: 145
5449

5550
# Offense count: 7
5651
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
5752
Metrics/MethodLength:
58-
Max: 21
53+
Max: 20
5954

6055
# Offense count: 2
6156
# Configuration parameters: IgnoredMethods.
6257
Metrics/PerceivedComplexity:
63-
Max: 11
58+
Max: 9
6459

6560
# Offense count: 1
6661
Naming/AccessorMethodName:
@@ -131,14 +126,14 @@ RSpec/LeakyConstantDeclaration:
131126
RSpec/MessageSpies:
132127
EnforcedStyle: receive
133128

134-
# Offense count: 8
129+
# Offense count: 9
135130
RSpec/MultipleExpectations:
136131
Max: 4
137132

138-
# Offense count: 3
133+
# Offense count: 14
139134
# Configuration parameters: AllowSubject.
140135
RSpec/MultipleMemoizedHelpers:
141-
Max: 6
136+
Max: 8
142137

143138
# Offense count: 44
144139
# Configuration parameters: IgnoreSharedExamples.
@@ -148,9 +143,9 @@ RSpec/NamedSubject:
148143
- 'spec/omniauth/identity/models/couch_potato_spec.rb'
149144
- 'spec/omniauth/identity/models/mongoid_spec.rb'
150145

151-
# Offense count: 6
146+
# Offense count: 12
152147
RSpec/NestedGroups:
153-
Max: 4
148+
Max: 5
154149

155150
# Offense count: 4
156151
RSpec/StubbedMock:

spec/omniauth/strategies/identity_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,10 +226,12 @@ def set_app!(identity_options = {})
226226
post '/auth/identity/register', properties
227227
expect(env_hash).to eq(nil)
228228
end
229+
229230
it 'renders registration form' do
230231
post '/auth/identity/register', properties
231232
expect(last_response.body).to be_include(described_class.default_options[:registration_form_title])
232233
end
234+
233235
it 'displays validation failure message' do
234236
post '/auth/identity/register', properties
235237
expect(last_response.body).to be_include(described_class.default_options[:validation_failure_message])
@@ -242,19 +244,23 @@ def set_app!(identity_options = {})
242244
true
243245
}
244246
end
247+
245248
it 'sets the auth hash' do
246249
post '/auth/identity/register', properties
247250
expect(auth_hash['uid']).to match(/\d+/)
248251
expect(auth_hash['provider']).to eq('identity')
249252
end
253+
250254
it 'does not render registration form' do
251255
post '/auth/identity/register', properties
252256
expect(last_response.body).not_to be_include(described_class.default_options[:registration_form_title])
253257
end
258+
254259
it 'does not display validation failure message' do
255260
post '/auth/identity/register', properties
256261
expect(last_response.body).not_to be_include(described_class.default_options[:validation_failure_message])
257262
end
263+
258264
it 'does not display registration failure message' do
259265
post '/auth/identity/register', properties
260266
expect(last_response.body).not_to be_include(described_class.default_options[:registration_failure_message])
@@ -317,10 +323,12 @@ def set_app!(identity_options = {})
317323
post '/auth/identity/register', properties
318324
expect(env_hash).to eq(nil)
319325
end
326+
320327
it 'renders registration form' do
321328
post '/auth/identity/register', properties
322329
expect(last_response.body).to be_include(described_class.default_options[:registration_form_title])
323330
end
331+
324332
it 'displays validation failure message' do
325333
post '/auth/identity/register', properties
326334
expect(last_response.body).to be_include(described_class.default_options[:validation_failure_message])
@@ -333,18 +341,22 @@ def set_app!(identity_options = {})
333341
true
334342
}
335343
end
344+
336345
it 'does not set the env hash' do
337346
post '/auth/identity/register', properties
338347
expect(env_hash).to eq(nil)
339348
end
349+
340350
it 'renders registration form' do
341351
post '/auth/identity/register', properties
342352
expect(last_response.body).to be_include(described_class.default_options[:registration_form_title])
343353
end
354+
344355
it 'does not display validation failure message' do
345356
post '/auth/identity/register', properties
346357
expect(last_response.body).not_to be_include(described_class.default_options[:validation_failure_message])
347358
end
359+
348360
it 'display registration failure message' do
349361
post '/auth/identity/register', properties
350362
expect(last_response.body).to be_include(described_class.default_options[:registration_failure_message])

0 commit comments

Comments
 (0)