Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
11d3b147
Commit
11d3b147
authored
Sep 21, 2020
by
Jake Lear
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inaccurate gitlab_employee? tests
parent
e1d66134
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
ee/spec/models/user_spec.rb
ee/spec/models/user_spec.rb
+5
-3
No files found.
ee/spec/models/user_spec.rb
View file @
11d3b147
...
...
@@ -1256,26 +1256,28 @@ RSpec.describe User do
context
'based on user type'
do
before
do
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
gitlab_group
.
add_user
(
user
,
Gitlab
::
Access
::
DEVELOPER
)
end
context
'when user is a bot'
do
let
(
:user
)
{
build
(
:user
,
user_type: :alert_bot
)
}
let
(
:user
)
{
create
(
:user
,
user_type: :alert_bot
)
}
it
{
is_expected
.
to
be
false
}
end
context
'when user is ghost'
do
let
(
:user
)
{
build
(
:user
,
:ghost
)
}
let
(
:user
)
{
create
(
:user
,
:ghost
)
}
it
{
is_expected
.
to
be
false
}
end
end
context
'when `:gitlab_employee_badge` feature flag is disabled'
do
let
(
:user
)
{
build
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
allow
(
Gitlab
).
to
receive
(
:com?
).
and_return
(
true
)
stub_feature_flags
(
gitlab_employee_badge:
false
)
gitlab_group
.
add_user
(
user
,
Gitlab
::
Access
::
DEVELOPER
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment