summaryrefslogtreecommitdiff
path: root/spec/services/emails/create_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/emails/create_service_spec.rb')
-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 75812c17309..54692c88623 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