From 7760b289478e5be70f4e907b797540c907fbbe81 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Tue, 7 Mar 2017 19:36:01 +0200 Subject: [PATCH] Remove delete_mailer view specs as it is too costly to maintain #268 --- .../forced/removed_company.html.erb_spec.rb | 12 ------ .../forced/removed_company.rb | 43 ------------------- .../forced/removed_company.text.erb_spec.rb | 12 ------ 3 files changed, 67 deletions(-) delete mode 100644 spec/views/mailers/domain_delete_mailer/forced/removed_company.html.erb_spec.rb delete mode 100644 spec/views/mailers/domain_delete_mailer/forced/removed_company.rb delete mode 100644 spec/views/mailers/domain_delete_mailer/forced/removed_company.text.erb_spec.rb diff --git a/spec/views/mailers/domain_delete_mailer/forced/removed_company.html.erb_spec.rb b/spec/views/mailers/domain_delete_mailer/forced/removed_company.html.erb_spec.rb deleted file mode 100644 index 5a92165b04..0000000000 --- a/spec/views/mailers/domain_delete_mailer/forced/removed_company.html.erb_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'rails_helper' -require_relative 'removed_company' - -RSpec.describe 'mailers/domain_delete_mailer/forced/removed_company.html.erb' do - before :example do - stub_template 'mailers/shared/registrar/_registrar.et.html' => 'test registrar estonian' - stub_template 'mailers/shared/registrar/_registrar.en.html' => 'test registrar english' - stub_template 'mailers/shared/registrar/_registrar.ru.html' => 'test registrar russian' - end - - include_examples 'domain delete mailer forced' -end diff --git a/spec/views/mailers/domain_delete_mailer/forced/removed_company.rb b/spec/views/mailers/domain_delete_mailer/forced/removed_company.rb deleted file mode 100644 index b8e696b81f..0000000000 --- a/spec/views/mailers/domain_delete_mailer/forced/removed_company.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'rails_helper' - -RSpec.shared_examples 'domain delete mailer forced' do - let(:domain) { instance_spy(DomainPresenter) } - let(:registrar) { instance_spy(RegistrarPresenter) } - let(:registrant) { instance_spy(RegistrantPresenter) } - let(:lang_count) { 3 } - - before :example do - assign(:domain, domain) - assign(:registrar, registrar) - assign(:registrant, registrant) - end - - it 'has registrar info in estonian' do - render - expect(rendered).to have_text('test registrar estonian') - end - - it 'has registrar info in english' do - render - expect(rendered).to have_text('test registrar english') - end - - it 'has registrar info in russian' do - render - expect(rendered).to have_text('test registrar russian') - end - - it 'has domain name' do - mention_count = 5 * lang_count - expect(domain).to receive(:name).exactly(mention_count).times.and_return('test domain name') - render - expect(rendered).to have_text('test domain name', count: mention_count) - end - - it 'has domain force delete date' do - mention_count = 1 * lang_count - expect(domain).to receive(:force_delete_date).exactly(mention_count).times.and_return('test domain force delete date') - render - expect(rendered).to have_text('test domain force delete date', count: mention_count) - end -end diff --git a/spec/views/mailers/domain_delete_mailer/forced/removed_company.text.erb_spec.rb b/spec/views/mailers/domain_delete_mailer/forced/removed_company.text.erb_spec.rb deleted file mode 100644 index ec527b0d7d..0000000000 --- a/spec/views/mailers/domain_delete_mailer/forced/removed_company.text.erb_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'rails_helper' -require_relative 'removed_company' - -RSpec.describe 'mailers/domain_delete_mailer/forced/removed_company.text.erb' do - before :example do - stub_template 'mailers/shared/registrar/_registrar.et.text' => 'test registrar estonian' - stub_template 'mailers/shared/registrar/_registrar.en.text' => 'test registrar english' - stub_template 'mailers/shared/registrar/_registrar.ru.text' => 'test registrar russian' - end - - include_examples 'domain delete mailer forced' -end