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:
authorBrett Walker <brett@digitalmoksha.com>2017-09-13 16:02:27 +0300
committerBrett Walker <brett@digitalmoksha.com>2017-09-23 16:24:53 +0300
commit85d2bf778a72f82b10f4bb6ebddc3cedf8ce4e4e (patch)
treea9de7ecc0d7580f447f91cf325ae9887dd43e374 /spec/services/emails
parentb2d53791614da093a32fd7040371cf2054aa9817 (diff)
when a primary email is replaced and added to the secondary emails list,
make sure it stays confirmed
Diffstat (limited to 'spec/services/emails')
-rw-r--r--spec/services/emails/create_service_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/services/emails/create_service_spec.rb b/spec/services/emails/create_service_spec.rb
index 641d5538de8..d028ee27a16 100644
--- a/spec/services/emails/create_service_spec.rb
+++ b/spec/services/emails/create_service_spec.rb
@@ -12,6 +12,11 @@ describe Emails::CreateService do
expect(Email.where(opts)).not_to be_empty
end
+ it 'creates an email with additional attributes' do
+ expect { service.execute(confirmation_token: 'abc') }.to change { Email.count }.by(1)
+ expect(Email.where(opts).first.confirmation_token).to eq 'abc'
+ end
+
it 'has the right user association' do
service.execute