Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-15 03:08:48 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-15 03:08:48 +0300
commitb69f406585ff64b1c5140ebba775cc754fabb358 (patch)
tree9af7dfeb0c3f0f8db189a6e18c6be398a7729e2d /spec/models/user_spec.rb
parent866ca4e49ff74ffadf8e6f6ff663a168489c2aba (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 90795e0a8e4..36ddb624cba 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -4200,4 +4200,17 @@ describe User, :do_not_mock_admin_mode do
expect(described_class.bots).to match_array([bot])
end
end
+
+ describe '#hook_attrs' do
+ it 'includes name, username, avatar_url, and email' do
+ user = create(:user)
+ user_attributes = {
+ name: user.name,
+ username: user.username,
+ avatar_url: user.avatar_url(only_path: false),
+ email: user.email
+ }
+ expect(user.hook_attrs).to eq(user_attributes)
+ end
+ end
end