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
0545c194
Commit
0545c194
authored
Apr 01, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
Apr 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor duplicate specs in user model specs
parent
9b863049
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
.rubocop.yml
.rubocop.yml
+0
-1
changelogs/unreleased/refactor-user-specs.yml
changelogs/unreleased/refactor-user-specs.yml
+5
-0
spec/models/user_spec.rb
spec/models/user_spec.rb
+4
-4
No files found.
.rubocop.yml
View file @
0545c194
...
...
@@ -414,7 +414,6 @@ RSpec/RepeatedExample:
-
'
spec/models/concerns/issuable_spec.rb'
-
'
spec/models/member_spec.rb'
-
'
spec/models/project_services/chat_message/pipeline_message_spec.rb'
-
'
spec/models/user_spec.rb'
-
'
spec/models/wiki_page_spec.rb'
-
'
spec/requests/api/merge_requests_spec.rb'
-
'
spec/routing/admin_routing_spec.rb'
...
...
changelogs/unreleased/refactor-user-specs.yml
0 → 100644
View file @
0545c194
---
title
:
Remove repeated examples in user model specs
merge_request
:
28450
author
:
Rajendra Kadam
type
:
changed
spec/models/user_spec.rb
View file @
0545c194
...
...
@@ -3681,15 +3681,15 @@ describe User, :do_not_mock_admin_mode do
end
it
'returns false if email can not be synced'
do
stub_omniauth_setting
(
sync_profile_attributes:
%w(location
email
)
)
stub_omniauth_setting
(
sync_profile_attributes:
%w(location
name
)
)
expect
(
user
.
sync_attribute?
(
:
name
)).
to
be_falsey
expect
(
user
.
sync_attribute?
(
:
email
)).
to
be_falsey
end
it
'returns false if location can not be synced'
do
stub_omniauth_setting
(
sync_profile_attributes:
%w(
location
email)
)
stub_omniauth_setting
(
sync_profile_attributes:
%w(
name
email)
)
expect
(
user
.
sync_attribute?
(
:
name
)).
to
be_falsey
expect
(
user
.
sync_attribute?
(
:
location
)).
to
be_falsey
end
it
'returns true for all syncable attributes if all syncable attributes can be synced'
do
...
...
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