diff options
author | Brett Walker <brett@digitalmoksha.com> | 2017-09-13 15:02:27 +0200 |
---|---|---|
committer | Brett Walker <brett@digitalmoksha.com> | 2017-09-23 15:24:53 +0200 |
commit | 85d2bf778a72f82b10f4bb6ebddc3cedf8ce4e4e (patch) | |
tree | a9de7ecc0d7580f447f91cf325ae9887dd43e374 /spec/services/emails | |
parent | b2d53791614da093a32fd7040371cf2054aa9817 (diff) | |
download | gitlab-ce-85d2bf778a72f82b10f4bb6ebddc3cedf8ce4e4e.tar.gz |
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.rb | 5 |
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 |