diff options
Diffstat (limited to 'spec/views/notify/change_in_merge_request_draft_status_email.text.erb_spec.rb')
-rw-r--r-- | spec/views/notify/change_in_merge_request_draft_status_email.text.erb_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/views/notify/change_in_merge_request_draft_status_email.text.erb_spec.rb b/spec/views/notify/change_in_merge_request_draft_status_email.text.erb_spec.rb new file mode 100644 index 00000000000..a05c20fd8c4 --- /dev/null +++ b/spec/views/notify/change_in_merge_request_draft_status_email.text.erb_spec.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true +require 'spec_helper' + +RSpec.describe 'notify/change_in_merge_request_draft_status_email.text.erb' 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_behaves_like 'renders plain text email correctly' + + 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 |