diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-03-21 16:07:52 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-03-21 16:07:52 -0400 |
commit | 4abca08f145aea1f8647fc43d9d226161e44fc07 (patch) | |
tree | c478a773f3ac45dac3be6b490de334de5aaac394 /spec/mailers | |
parent | 45a2f9009bca7a2ba86688f1cf3945dde4381c77 (diff) | |
download | gitlab-ce-4abca08f145aea1f8647fc43d9d226161e44fc07.tar.gz |
Move the `a new user email` shared example to the Emails::Profile spec
This shared example was only used by this spec so having it in a
separate file provided no benefit, at the cost of clarity. This also
reduces the three `it` blocks into a single test with
`aggregate_failures`.
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/emails/profile_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/mailers/emails/profile_spec.rb b/spec/mailers/emails/profile_spec.rb index e1877d5fde0..5ca936f28f0 100644 --- a/spec/mailers/emails/profile_spec.rb +++ b/spec/mailers/emails/profile_spec.rb @@ -5,6 +5,16 @@ describe Notify do include EmailSpec::Matchers include_context 'gitlab email notification' + shared_examples 'a new user email' do + it 'is sent to the new user with the correct subject and body' do + aggregate_failures do + is_expected.to deliver_to new_user_address + is_expected.to have_subject(/^Account was created for you$/i) + is_expected.to have_body_text(new_user_address) + end + end + end + describe 'profile notifications' do describe 'for new users, the email' do let(:example_site_path) { root_path } |