mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Resolve merge errors
This commit is contained in:
commit
73e9dd6870
817 changed files with 16875 additions and 17443 deletions
|
@ -1,20 +1,30 @@
|
|||
if ENV['COVERAGE']
|
||||
require 'simplecov'
|
||||
SimpleCov.command_name 'test'
|
||||
SimpleCov.start 'rails' do
|
||||
add_filter '/app/models/version/'
|
||||
add_filter '/lib/action_controller/'
|
||||
add_filter '/lib/core_monkey_patches/'
|
||||
add_filter '/lib/daemons/'
|
||||
add_filter '/lib/gem_monkey_patches/'
|
||||
end
|
||||
end
|
||||
|
||||
ENV['RAILS_ENV'] ||= 'test'
|
||||
require File.expand_path('../../config/environment', __FILE__)
|
||||
require_relative '../config/environment'
|
||||
require 'rails/test_help'
|
||||
require 'minitest/mock'
|
||||
require 'capybara/rails'
|
||||
require 'capybara/minitest'
|
||||
require 'webmock/minitest'
|
||||
require 'support/rails5_assertions' # Remove once upgraded to Rails 5
|
||||
require 'support/task_test_case'
|
||||
require 'support/assertions/epp_assertions'
|
||||
|
||||
Setting.address_processing = false
|
||||
Setting.registry_country_code = 'US'
|
||||
|
||||
# `bin/rails test` is not the same as `bin/rake test`.
|
||||
# All tasks will be loaded (and executed) twice when using the former without `Rake::Task.clear`.
|
||||
# https://github.com/rails/rails/issues/28786
|
||||
require 'rake'
|
||||
Rake::Task.clear
|
||||
Rails.application.load_tasks
|
||||
|
||||
class CompanyRegisterClientStub
|
||||
Company = Struct.new(:registration_number)
|
||||
|
@ -29,8 +39,6 @@ CompanyRegister::Client = CompanyRegisterClientStub
|
|||
EInvoice.provider = EInvoice::Providers::TestProvider.new
|
||||
|
||||
class ActiveSupport::TestCase
|
||||
include FactoryBot::Syntax::Methods
|
||||
|
||||
ActiveRecord::Migration.check_pending!
|
||||
fixtures :all
|
||||
set_fixture_class log_domains: DomainVersion
|
||||
|
@ -40,13 +48,6 @@ class ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
# Allows testing OPTIONS request just like GET or POST
|
||||
module ActionDispatch::Integration::RequestHelpers
|
||||
def options(path, parameters = nil, headers_or_env = nil)
|
||||
process :options, path, parameters, headers_or_env
|
||||
end
|
||||
end
|
||||
|
||||
class ApplicationIntegrationTest < ActionDispatch::IntegrationTest
|
||||
include Capybara::DSL
|
||||
include Capybara::Minitest::Assertions
|
||||
|
@ -60,4 +61,6 @@ class ApplicationIntegrationTest < ActionDispatch::IntegrationTest
|
|||
end
|
||||
end
|
||||
|
||||
require 'application_system_test_case'
|
||||
class EppTestCase < ActionDispatch::IntegrationTest
|
||||
include Assertions::EppAssertions
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue