summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-10-30 08:53:24 +0000
committerDouwe Maan <douwe@gitlab.com>2017-10-30 08:53:24 +0000
commitf03700f5e429a86934e7cd2fa958da75b722db49 (patch)
tree6b046d55901cf57ef918a4071cd04c7394b80a71 /spec/models
parent6d7384f59525e2d54c30011237499c27bde145ef (diff)
parent306d030240b4678a94cf8bf8af11c07100abfa7c (diff)
downloadgitlab-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.rb8
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