summaryrefslogtreecommitdiff
path: root/spec/services/emails
diff options
context:
space:
mode:
authorBrett Walker <brett@digitalmoksha.com>2017-09-09 15:55:07 +0200
committerBrett Walker <brett@digitalmoksha.com>2017-09-23 15:23:11 +0200
commitcf8a5bcaec99cc197ff556793febb8317e1db220 (patch)
tree0c709b59f04d02eb572f01aca2caf059336bffeb /spec/services/emails
parentc56208f98028d10f8f2ab315ae52e9fcacc45399 (diff)
downloadgitlab-ce-cf8a5bcaec99cc197ff556793febb8317e1db220.tar.gz
add verified/unverified labels to profile emails.
added "Resend confirmation email" for unverified emails
Diffstat (limited to 'spec/services/emails')
-rw-r--r--spec/services/emails/confirm_service_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/emails/confirm_service_spec.rb b/spec/services/emails/confirm_service_spec.rb
new file mode 100644
index 00000000000..2f348589136
--- /dev/null
+++ b/spec/services/emails/confirm_service_spec.rb
@@ -0,0 +1,16 @@
+require 'spec_helper'
+
+describe Emails::ConfirmService do
+ let(:user) { create(:user) }
+ let(:opts) { { email: 'new@email.com' } }
+
+ subject(:service) { described_class.new(user, opts) }
+
+ describe '#execute' do
+ it 'sends a confirmation email again' do
+ email = user.emails.create(email: opts[:email])
+ mail = service.execute
+ expect(mail.subject).to eq('Confirmation instructions')
+ end
+ end
+end