From a09983ae35713f5a2bbb100981116d31ce99826e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Jul 2020 12:26:25 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-2-stable-ee --- .../notify/changed_milestone_email.html.haml_spec.rb | 2 +- .../notify/pipeline_failed_email.html.haml_spec.rb | 2 +- .../notify/pipeline_failed_email.text.erb_spec.rb | 2 +- .../notify/pipeline_fixed_email.html.haml_spec.rb | 2 +- .../notify/pipeline_fixed_email.text.erb_spec.rb | 2 +- .../notify/pipeline_success_email.html.haml_spec.rb | 2 +- .../notify/pipeline_success_email.text.erb_spec.rb | 2 +- .../push_to_merge_request_email.text.haml_spec.rb | 19 +++++++++++++++++++ 8 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 spec/views/notify/push_to_merge_request_email.text.haml_spec.rb (limited to 'spec/views/notify') diff --git a/spec/views/notify/changed_milestone_email.html.haml_spec.rb b/spec/views/notify/changed_milestone_email.html.haml_spec.rb index 194b58840a3..50a06683409 100644 --- a/spec/views/notify/changed_milestone_email.html.haml_spec.rb +++ b/spec/views/notify/changed_milestone_email.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'notify/changed_milestone_email.html.haml' do +RSpec.describe 'notify/changed_milestone_email.html.haml' do let(:milestone) { create(:milestone, title: 'some-milestone') } let(:milestone_link) { milestone_url(milestone) } diff --git a/spec/views/notify/pipeline_failed_email.html.haml_spec.rb b/spec/views/notify/pipeline_failed_email.html.haml_spec.rb index 80dc14b523d..b41933f9c36 100644 --- a/spec/views/notify/pipeline_failed_email.html.haml_spec.rb +++ b/spec/views/notify/pipeline_failed_email.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'notify/pipeline_failed_email.html.haml' do +RSpec.describe 'notify/pipeline_failed_email.html.haml' do it_behaves_like 'pipeline status changes email' do let(:title) { 'Your pipeline has failed' } let(:status) { :failed } diff --git a/spec/views/notify/pipeline_failed_email.text.erb_spec.rb b/spec/views/notify/pipeline_failed_email.text.erb_spec.rb index 9a4cea408a6..a5c31632b0d 100644 --- a/spec/views/notify/pipeline_failed_email.text.erb_spec.rb +++ b/spec/views/notify/pipeline_failed_email.text.erb_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -describe 'notify/pipeline_failed_email.text.erb' do +RSpec.describe 'notify/pipeline_failed_email.text.erb' do include Devise::Test::ControllerHelpers let(:user) { create(:user, developer_projects: [project]) } diff --git a/spec/views/notify/pipeline_fixed_email.html.haml_spec.rb b/spec/views/notify/pipeline_fixed_email.html.haml_spec.rb index 382fc5ecdd3..2b3b08f8e8c 100644 --- a/spec/views/notify/pipeline_fixed_email.html.haml_spec.rb +++ b/spec/views/notify/pipeline_fixed_email.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'notify/pipeline_fixed_email.html.haml' do +RSpec.describe 'notify/pipeline_fixed_email.html.haml' do it_behaves_like 'pipeline status changes email' do let(:title) { 'Your pipeline has been fixed!' } let(:status) { :success } diff --git a/spec/views/notify/pipeline_fixed_email.text.erb_spec.rb b/spec/views/notify/pipeline_fixed_email.text.erb_spec.rb index ec540dc3f77..8640998acaa 100644 --- a/spec/views/notify/pipeline_fixed_email.text.erb_spec.rb +++ b/spec/views/notify/pipeline_fixed_email.text.erb_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'notify/pipeline_fixed_email.text.erb' do +RSpec.describe 'notify/pipeline_fixed_email.text.erb' do it_behaves_like 'pipeline status changes email' do let(:title) { 'Your pipeline has been fixed!' } let(:status) { :success } diff --git a/spec/views/notify/pipeline_success_email.html.haml_spec.rb b/spec/views/notify/pipeline_success_email.html.haml_spec.rb index 417909fd67b..51ea7ef5066 100644 --- a/spec/views/notify/pipeline_success_email.html.haml_spec.rb +++ b/spec/views/notify/pipeline_success_email.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'notify/pipeline_success_email.html.haml' do +RSpec.describe 'notify/pipeline_success_email.html.haml' do it_behaves_like 'pipeline status changes email' do let(:title) { 'Your pipeline has passed' } let(:status) { :success } diff --git a/spec/views/notify/pipeline_success_email.text.erb_spec.rb b/spec/views/notify/pipeline_success_email.text.erb_spec.rb index 4a914cab85e..3acf4dd3e26 100644 --- a/spec/views/notify/pipeline_success_email.text.erb_spec.rb +++ b/spec/views/notify/pipeline_success_email.text.erb_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'notify/pipeline_success_email.text.erb' do +RSpec.describe 'notify/pipeline_success_email.text.erb' do it_behaves_like 'pipeline status changes email' do let(:title) { 'Your pipeline has passed' } let(:status) { :success } diff --git a/spec/views/notify/push_to_merge_request_email.text.haml_spec.rb b/spec/views/notify/push_to_merge_request_email.text.haml_spec.rb new file mode 100644 index 00000000000..ce402533496 --- /dev/null +++ b/spec/views/notify/push_to_merge_request_email.text.haml_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true +require 'spec_helper' + +RSpec.describe 'notify/push_to_merge_request_email.text.haml' do + let(:user) { create(:user, developer_projects: [project]) } + let(:project) { create(:project, :repository) } + let(:merge_request) { create(:merge_request, :simple, source_project: project) } + let(:new_commits) { project.repository.commits_between('be93687618e4b132087f430a4d8fc3a609c9b77c', '54fcc214b94e78d7a41a9a8fe6d87a5e59500e51') } + + before do + assign(:updated_by_user, user) + assign(:project, project) + assign(:merge_request, merge_request) + assign(:existing_commits, []) + assign(:new_commits, new_commits) + end + + it_behaves_like 'renders plain text email correctly' +end -- cgit v1.2.3