diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-10-30 08:53:24 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-10-30 08:53:24 +0000 |
commit | f03700f5e429a86934e7cd2fa958da75b722db49 (patch) | |
tree | 6b046d55901cf57ef918a4071cd04c7394b80a71 /spec/models | |
parent | 6d7384f59525e2d54c30011237499c27bde145ef (diff) | |
parent | 306d030240b4678a94cf8bf8af11c07100abfa7c (diff) | |
download | gitlab-ce-f03700f5e429a86934e7cd2fa958da75b722db49.tar.gz |
Merge branch '39366-email-confirmation-fails' into 'master'
grab the correct username when confirming secondary email
Closes #39366
See merge request gitlab-org/gitlab-ce!15010
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/email_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/email_spec.rb b/spec/models/email_spec.rb index b32dd31ae6d..47eb0717c0c 100644 --- a/spec/models/email_spec.rb +++ b/spec/models/email_spec.rb @@ -40,4 +40,12 @@ describe Email do expect(user.emails.confirmed.count).to eq 1 end end + + describe 'delegation' do + let(:user) { create(:user) } + + it 'delegates to :user' do + expect(build(:email, user: user).username).to eq user.username + end + end end |