diff options
Diffstat (limited to 'spec/views/notify/change_in_merge_request_draft_status_email.html.haml_spec.rb')
-rw-r--r-- | spec/views/notify/change_in_merge_request_draft_status_email.html.haml_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/views/notify/change_in_merge_request_draft_status_email.html.haml_spec.rb b/spec/views/notify/change_in_merge_request_draft_status_email.html.haml_spec.rb new file mode 100644 index 00000000000..6c25eba03b9 --- /dev/null +++ b/spec/views/notify/change_in_merge_request_draft_status_email.html.haml_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'notify/change_in_merge_request_draft_status_email.html.haml' do + let(:user) { create(:user) } + let(:merge_request) { create(:merge_request) } + + before do + assign(:updated_by_user, user) + assign(:merge_request, merge_request) + end + + it 'renders the email correctly' do + render + + expect(rendered).to have_content("#{user.name} changed the draft status of merge request #{merge_request.to_reference}") + end +end |