diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-04 09:09:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-04 09:09:49 +0300 |
commit | b41e09c9ce655d61557a3513508952240506b161 (patch) | |
tree | 30c4c04800383f01175961e84415ecf9b8eff437 /spec/models/user_spec.rb | |
parent | 47b5ca54362fa51c08f4525415bb6887b8a7ba92 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r-- | spec/models/user_spec.rb | 9 |
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) |