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>2021-08-04 09:09:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-04 09:09:49 +0300
commitb41e09c9ce655d61557a3513508952240506b161 (patch)
tree30c4c04800383f01175961e84415ecf9b8eff437 /spec/models/user_spec.rb
parent47b5ca54362fa51c08f4525415bb6887b8a7ba92 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index f16277c3ff6..bce21cfdab2 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -77,6 +77,9 @@ RSpec.describe User do
it { is_expected.to delegate_method(:pronouns).to(:user_detail).allow_nil }
it { is_expected.to delegate_method(:pronouns=).to(:user_detail).with_arguments(:args).allow_nil }
+ it { is_expected.to delegate_method(:pronunciation).to(:user_detail).allow_nil }
+ it { is_expected.to delegate_method(:pronunciation=).to(:user_detail).with_arguments(:args).allow_nil }
+
it { is_expected.to delegate_method(:bio).to(:user_detail).allow_nil }
it { is_expected.to delegate_method(:bio=).to(:user_detail).with_arguments(:args).allow_nil }
it { is_expected.to delegate_method(:bio_html).to(:user_detail).allow_nil }
@@ -146,6 +149,12 @@ RSpec.describe User do
expect(user.pronouns).to eq(user.user_detail.pronouns)
end
+ it 'delegates `pronunciation` to `user_detail`' do
+ user = create(:user, name: 'Example', pronunciation: 'uhg-zaam-pl')
+
+ expect(user.pronunciation).to eq(user.user_detail.pronunciation)
+ end
+
it 'creates `user_detail` when `bio` is first updated' do
user = create(:user)