Commit 7b6dd7b3 authored by Rémy Coutable's avatar Rémy Coutable

Resolve conflicts

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent baf94bf1
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 0`
<<<<<<< HEAD
# on 2017-01-11 09:34:02 +0000 using RuboCop version 0.46.0.
=======
# on 2017-01-11 09:38:25 +0000 using RuboCop version 0.46.0.
>>>>>>> ce/master
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
<<<<<<< HEAD
# Offense count: 28
=======
# Offense count: 27
>>>>>>> ce/master
# Configuration parameters: Include.
# Include: **/Gemfile, **/gems.rb
Bundler/OrderedGems:
Enabled: false
<<<<<<< HEAD
# Offense count: 181
Lint/AmbiguousRegexpLiteral:
Enabled: false
# Offense count: 60
=======
# Offense count: 175
Lint/AmbiguousRegexpLiteral:
Enabled: false
# Offense count: 53
>>>>>>> ce/master
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
Enabled: false
......@@ -41,15 +25,11 @@ Lint/AssignmentInCondition:
Lint/EmptyWhen:
Enabled: false
<<<<<<< HEAD
# Offense count: 22
=======
# Offense count: 20
>>>>>>> ce/master
Lint/HandleExceptions:
Enabled: false
# Offense count: 1
# Offense count: 2
Lint/Loop:
Enabled: false
......@@ -62,50 +42,29 @@ Lint/ShadowingOuterLocalVariable:
Lint/UnifiedInteger:
Enabled: false
<<<<<<< HEAD
# Offense count: 22
=======
# Offense count: 21
>>>>>>> ce/master
# Cop supports --auto-correct.
Lint/UnneededSplatExpansion:
Enabled: false
<<<<<<< HEAD
# Offense count: 95
=======
# Offense count: 82
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
Lint/UnusedBlockArgument:
Enabled: false
<<<<<<< HEAD
# Offense count: 186
=======
# Offense count: 173
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
Lint/UnusedMethodArgument:
Enabled: false
<<<<<<< HEAD
# Offense count: 112
# Configuration parameters: CountComments.
Metrics/BlockLength:
Max: 303
# Offense count: 4
=======
# Offense count: 93
# Configuration parameters: CountComments.
Metrics/BlockLength:
Max: 288
# Offense count: 3
>>>>>>> ce/master
# Cop supports --auto-correct.
Performance/RedundantBlockCall:
Enabled: false
......@@ -115,11 +74,7 @@ Performance/RedundantBlockCall:
Performance/RedundantMatch:
Enabled: false
<<<<<<< HEAD
# Offense count: 36
=======
# Offense count: 32
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: MaxKeyValuePairs.
Performance/RedundantMerge:
......@@ -129,11 +84,7 @@ Performance/RedundantMerge:
RSpec/BeEql:
Enabled: false
<<<<<<< HEAD
# Offense count: 26
=======
# Offense count: 15
>>>>>>> ce/master
# Configuration parameters: CustomIncludeMethods.
RSpec/EmptyExampleGroup:
Enabled: false
......@@ -142,27 +93,18 @@ RSpec/EmptyExampleGroup:
RSpec/ExpectActual:
Enabled: false
<<<<<<< HEAD
# Offense count: 83
=======
# Offense count: 58
>>>>>>> ce/master
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: implicit, each, example
RSpec/HookArgument:
Enabled: false
<<<<<<< HEAD
# Offense count: 25
=======
# Offense count: 12
>>>>>>> ce/master
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: is_expected, should
RSpec/ImplicitExpect:
Enabled: false
<<<<<<< HEAD
# Offense count: 265
RSpec/LeadingSubject:
Enabled: false
......@@ -176,27 +118,11 @@ RSpec/MessageChain:
Enabled: false
# Offense count: 518
=======
# Offense count: 237
RSpec/LeadingSubject:
Enabled: false
# Offense count: 253
RSpec/LetSetup:
Enabled: false
# Offense count: 13
RSpec/MessageChain:
Enabled: false
# Offense count: 479
>>>>>>> ce/master
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
Enabled: false
<<<<<<< HEAD
# Offense count: 3278
RSpec/MultipleExpectations:
Max: 37
......@@ -206,26 +132,11 @@ RSpec/NamedSubject:
Enabled: false
# Offense count: 2111
=======
# Offense count: 3036
RSpec/MultipleExpectations:
Max: 37
# Offense count: 2133
RSpec/NamedSubject:
Enabled: false
# Offense count: 1974
>>>>>>> ce/master
# Configuration parameters: MaxNesting.
RSpec/NestedGroups:
Enabled: false
<<<<<<< HEAD
# Offense count: 36
=======
# Offense count: 32
>>>>>>> ce/master
RSpec/RepeatedDescription:
Enabled: false
......@@ -233,49 +144,29 @@ RSpec/RepeatedDescription:
RSpec/SingleArgumentMessageChain:
Enabled: false
<<<<<<< HEAD
# Offense count: 137
RSpec/SubjectStub:
Enabled: false
# Offense count: 113
=======
# Offense count: 133
RSpec/SubjectStub:
Enabled: false
# Offense count: 104
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: Whitelist.
# Whitelist: find_by_sql
Rails/DynamicFindBy:
Enabled: false
<<<<<<< HEAD
# Offense count: 1010
=======
# Offense count: 932
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: Include.
# Include: spec/**/*, test/**/*
Rails/HttpPositionalArguments:
Enabled: false
<<<<<<< HEAD
# Offense count: 59
Rails/OutputSafety:
Enabled: false
# Offense count: 203
=======
# Offense count: 55
Rails/OutputSafety:
Enabled: false
# Offense count: 182
>>>>>>> ce/master
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: strict, flexible
Rails/TimeZone:
......@@ -288,54 +179,34 @@ Rails/TimeZone:
Rails/Validation:
Enabled: false
<<<<<<< HEAD
# Offense count: 9
=======
# Offense count: 8
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect.
Security/JSONLoad:
Enabled: false
<<<<<<< HEAD
# Offense count: 365
=======
# Offense count: 346
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: with_first_parameter, with_fixed_indentation
Style/AlignParameters:
Enabled: false
<<<<<<< HEAD
# Offense count: 29
=======
# Offense count: 27
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: always, conditionals
Style/AndOr:
Enabled: false
<<<<<<< HEAD
# Offense count: 53
=======
# Offense count: 54
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: percent_q, bare_percent
Style/BarePercentLiterals:
Enabled: false
<<<<<<< HEAD
# Offense count: 387
=======
# Offense count: 358
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: braces, no_braces, context_dependent
......@@ -346,11 +217,7 @@ Style/BracesAroundHashParameters:
Style/CaseEquality:
Enabled: false
<<<<<<< HEAD
# Offense count: 41
=======
# Offense count: 37
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/ColonMethodCall:
Enabled: false
......@@ -362,50 +229,30 @@ Style/ColonMethodCall:
Style/CommentAnnotation:
Enabled: false
<<<<<<< HEAD
# Offense count: 33
=======
# Offense count: 29
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
# SupportedStyles: assign_to_condition, assign_inside_condition
Style/ConditionalAssignment:
Enabled: false
<<<<<<< HEAD
# Offense count: 1279
=======
# Offense count: 1210
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: leading, trailing
Style/DotPosition:
Enabled: false
<<<<<<< HEAD
# Offense count: 19
Style/DoubleNegation:
Enabled: false
# Offense count: 10
=======
# Offense count: 18
Style/DoubleNegation:
Enabled: false
# Offense count: 7
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/EachWithObject:
Enabled: false
<<<<<<< HEAD
# Offense count: 25
=======
# Offense count: 24
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: empty, nil, both
......@@ -417,22 +264,14 @@ Style/EmptyElse:
Style/EmptyLiteral:
Enabled: false
<<<<<<< HEAD
# Offense count: 64
=======
# Offense count: 57
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: compact, expanded
Style/EmptyMethod:
Enabled: false
<<<<<<< HEAD
# Offense count: 159
=======
# Offense count: 147
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Style/ExtraSpacing:
......@@ -444,11 +283,7 @@ Style/ExtraSpacing:
Style/FormatString:
Enabled: false
<<<<<<< HEAD
# Offense count: 287
=======
# Offense count: 238
>>>>>>> ce/master
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Enabled: false
......@@ -457,43 +292,27 @@ Style/GuardClause:
Style/IfInsideElse:
Enabled: false
<<<<<<< HEAD
# Offense count: 186
=======
# Offense count: 173
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
Enabled: false
<<<<<<< HEAD
# Offense count: 61
=======
# Offense count: 55
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Style/IndentArray:
Enabled: false
<<<<<<< HEAD
# Offense count: 128
=======
# Offense count: 101
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Style/IndentHash:
Enabled: false
<<<<<<< HEAD
# Offense count: 49
=======
# Offense count: 41
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: line_count_dependent, lambda, literal
......@@ -519,11 +338,7 @@ Style/MethodMissing:
Style/MultilineIfModifier:
Enabled: false
<<<<<<< HEAD
# Offense count: 200
=======
# Offense count: 179
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/MutableConstant:
Enabled: false
......@@ -547,31 +362,19 @@ Style/Next:
Style/NumericLiteralPrefix:
Enabled: false
<<<<<<< HEAD
# Offense count: 24
=======
# Offense count: 19
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Enabled: false
<<<<<<< HEAD
# Offense count: 35
=======
# Offense count: 34
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/ParallelAssignment:
Enabled: false
<<<<<<< HEAD
# Offense count: 427
=======
# Offense count: 417
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
......@@ -589,11 +392,7 @@ Style/PercentQLiterals:
Style/PerlBackrefs:
Enabled: false
<<<<<<< HEAD
# Offense count: 69
=======
# Offense count: 64
>>>>>>> ce/master
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
# NamePrefix: is_, has_, have_
# NamePrefixBlacklist: is_, has_, have_
......@@ -601,11 +400,7 @@ Style/PerlBackrefs:
Style/PredicateName:
Enabled: false
<<<<<<< HEAD
# Offense count: 36
=======
# Offense count: 33
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: short, verbose
......@@ -617,11 +412,7 @@ Style/PreferredHashMethods:
Style/Proc:
Enabled: false
<<<<<<< HEAD
# Offense count: 52
=======
# Offense count: 50
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: compact, exploded
......@@ -649,40 +440,24 @@ Style/RedundantFreeze:
Style/RedundantReturn:
Enabled: false
<<<<<<< HEAD
# Offense count: 462
=======
# Offense count: 359
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/RedundantSelf:
Enabled: false
<<<<<<< HEAD
# Offense count: 109
=======
# Offense count: 105
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
Enabled: false
<<<<<<< HEAD
# Offense count: 23
=======
# Offense count: 19
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/RescueModifier:
Enabled: false
<<<<<<< HEAD
# Offense count: 8
=======
# Offense count: 7
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/SelfAssignment:
Enabled: false
......@@ -699,72 +474,44 @@ Style/SingleLineBlockParams:
Style/SingleLineMethods:
Enabled: false
<<<<<<< HEAD
# Offense count: 166
=======
# Offense count: 138
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: space, no_space
Style/SpaceBeforeBlockBraces:
Enabled: false
<<<<<<< HEAD
# Offense count: 9
=======
# Offense count: 8
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Style/SpaceBeforeFirstArg:
Enabled: false
<<<<<<< HEAD
# Offense count: 44
=======
# Offense count: 37
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: require_no_space, require_space
Style/SpaceInLambdaLiteral:
Enabled: false
<<<<<<< HEAD
# Offense count: 180
=======
# Offense count: 174
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
Style/SpaceInsideBlockBraces:
Enabled: false
<<<<<<< HEAD
# Offense count: 118
=======
# Offense count: 115
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/SpaceInsideBrackets:
Enabled: false
<<<<<<< HEAD
# Offense count: 86
=======
# Offense count: 77
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/SpaceInsideParens:
Enabled: false
<<<<<<< HEAD
# Offense count: 6
=======
# Offense count: 4
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/SpaceInsidePercentLiteralDelimiters:
Enabled: false
......@@ -776,22 +523,14 @@ Style/SpaceInsidePercentLiteralDelimiters:
Style/SpecialGlobalVars:
EnforcedStyle: use_perl_names
<<<<<<< HEAD
# Offense count: 29
=======
# Offense count: 25
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiteralsInInterpolation:
Enabled: false
<<<<<<< HEAD
# Offense count: 56
=======
# Offense count: 54
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
# IgnoredMethods: respond_to, define_method
......@@ -812,11 +551,7 @@ Style/TernaryParentheses:
Style/TrailingCommaInArguments:
Enabled: false
<<<<<<< HEAD
# Offense count: 166
=======
# Offense count: 150
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
# SupportedStyles: comma, consistent_comma, no_comma
......@@ -829,20 +564,12 @@ Style/TrailingCommaInLiteral:
Style/TrailingUnderscoreVariable:
Enabled: false
<<<<<<< HEAD
# Offense count: 86
=======
# Offense count: 67
>>>>>>> ce/master
# Cop supports --auto-correct.
Style/TrailingWhitespace:
Enabled: false
<<<<<<< HEAD
# Offense count: 4
=======
# Offense count: 3
>>>>>>> ce/master
# Cop supports --auto-correct.
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
......
......@@ -284,14 +284,10 @@ GEM
diff-lcs (~> 1.1)
mime-types (>= 1.16, < 3)
posix-spawn (~> 0.3)
<<<<<<< HEAD
gitlab-license (1.0.0)
gitlab-markup (1.5.0)
=======
gitlab-markup (1.5.1)
gitlab-turbolinks-classic (2.5.6)
coffee-rails
>>>>>>> ce/master
gitlab_omniauth-ldap (1.2.1)
net-ldap (~> 0.9)
omniauth (~> 1.0)
......@@ -923,13 +919,9 @@ DEPENDENCIES
github-linguist (~> 4.7.0)
gitlab-elasticsearch-git (~> 1.0.1)
gitlab-flowdock-git-hook (~> 1.0.1)
<<<<<<< HEAD
gitlab-license (~> 1.0)
gitlab-markup (~> 1.5.0)
=======
gitlab-markup (~> 1.5.1)
gitlab-turbolinks-classic (~> 2.5, >= 2.5.6)
>>>>>>> ce/master
gitlab_omniauth-ldap (~> 1.2.1)
gollum-lib (~> 4.2)
gollum-rugged_adapter (~> 0.4.2)
......@@ -1012,11 +1004,7 @@ DEPENDENCIES
rqrcode-rails3 (~> 0.1.7)
rspec-rails (~> 3.5.0)
rspec-retry (~> 0.4.5)
<<<<<<< HEAD
rubocop (~> 0.43.0)
=======
rubocop (~> 0.46.0)
>>>>>>> ce/master
rubocop-rspec (~> 1.9.1)
ruby-fogbugz (~> 0.2.1)
ruby-prof (~> 0.16.2)
......
......@@ -69,7 +69,24 @@ module Gitlab
@ldap_user ||= Gitlab::LDAP::Person.find_by_dn(user.ldap_identity.extern_uid, adapter)
end
<<<<<<< HEAD
def block_user(user, reason)
user.ldap_block
Gitlab::AppLogger.info(
"LDAP account \"#{user.ldap_identity.extern_uid}\" #{reason}, " \
"blocking Gitlab user \"#{user.name}\" (#{user.email})"
)
end
def unblock_user(user, reason)
user.activate
Gitlab::AppLogger.info(
"LDAP account \"#{user.ldap_identity.extern_uid}\" #{reason}, " \
"unblocking Gitlab user \"#{user.name}\" (#{user.email})"
)
end
def update_user
update_email
update_ssh_keys if sync_ssh_keys?
......@@ -151,24 +168,6 @@ module Gitlab
def logger
Rails.logger
=======
def block_user(user, reason)
user.ldap_block
Gitlab::AppLogger.info(
"LDAP account \"#{user.ldap_identity.extern_uid}\" #{reason}, " \
"blocking Gitlab user \"#{user.name}\" (#{user.email})"
)
end
def unblock_user(user, reason)
user.activate
Gitlab::AppLogger.info(
"LDAP account \"#{user.ldap_identity.extern_uid}\" #{reason}, " \
"unblocking Gitlab user \"#{user.name}\" (#{user.email})"
)
>>>>>>> ce/master
end
end
end
......
......@@ -14,13 +14,9 @@ describe Gitlab::LDAP::Access, lib: true do
it { is_expected.to be_falsey }
<<<<<<< HEAD
it 'blocks user in GitLab' do
=======
it 'should block user in GitLab' do
expect(access).to receive(:block_user).with(user, 'does not exist anymore')
>>>>>>> ce/master
access.allowed?
end
end
......@@ -116,7 +112,48 @@ describe Gitlab::LDAP::Access, lib: true do
end
end
<<<<<<< HEAD
describe '#block_user' do
before do
user.activate
allow(Gitlab::AppLogger).to receive(:info)
access.block_user user, 'reason'
end
it 'blocks the user' do
expect(user).to be_blocked
expect(user).to be_ldap_blocked
end
it 'logs the reason' do
expect(Gitlab::AppLogger).to have_received(:info).with(
"LDAP account \"123456\" reason, " \
"blocking Gitlab user \"#{user.name}\" (#{user.email})"
)
end
end
describe '#unblock_user' do
before do
user.ldap_block
allow(Gitlab::AppLogger).to receive(:info)
access.unblock_user user, 'reason'
end
it 'activates the user' do
expect(user).not_to be_blocked
expect(user).not_to be_ldap_blocked
end
it 'logs the reason' do
Gitlab::AppLogger.info(
"LDAP account \"123456\" reason, " \
"unblocking Gitlab user \"#{user.name}\" (#{user.email})"
)
end
end
describe '#update_user' do
subject { access.update_user }
let(:entry) do
......@@ -266,47 +303,6 @@ describe Gitlab::LDAP::Access, lib: true do
it "updates the email if the user email is different" do
entry['mail'] = ["new_email@example.com"]
expect{ access.update_email }.to change(user, :email)
=======
describe '#block_user' do
before do
user.activate
allow(Gitlab::AppLogger).to receive(:info)
access.block_user user, 'reason'
end
it 'blocks the user' do
expect(user).to be_blocked
expect(user).to be_ldap_blocked
end
it 'logs the reason' do
expect(Gitlab::AppLogger).to have_received(:info).with(
"LDAP account \"123456\" reason, " \
"blocking Gitlab user \"#{user.name}\" (#{user.email})"
)
end
end
describe '#unblock_user' do
before do
user.ldap_block
allow(Gitlab::AppLogger).to receive(:info)
access.unblock_user user, 'reason'
end
it 'activates the user' do
expect(user).not_to be_blocked
expect(user).not_to be_ldap_blocked
end
it 'logs the reason' do
Gitlab::AppLogger.info(
"LDAP account \"123456\" reason, " \
"unblocking Gitlab user \"#{user.name}\" (#{user.email})"
)
>>>>>>> ce/master
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment