mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Change test structure to follow closer newer Rails 5 rules
* Create new class called ApplicationIntegrationTest, so we don't have to override ActionDispatch::IntegrationTest * Move UI tests to inherit from ApplicationSystemTestCase * Existing REST API or EPP tests inherit from ApplicationIntegrationTest. * Move `require 'application_system_test_case'` at the end of `test_helper` I don't particularly agree with the Rails' convention of treating UI tests as system tests and API tests as integration tests, but I see no benefit in actively fighting against it.
This commit is contained in:
parent
311aa503b3
commit
526a9ccd58
41 changed files with 42 additions and 42 deletions
|
@ -13,8 +13,6 @@ require 'capybara/minitest'
|
|||
require 'webmock/minitest'
|
||||
require 'support/rails5_assertions' # Remove once upgraded to Rails 5
|
||||
|
||||
require 'application_system_test_case'
|
||||
|
||||
Setting.address_processing = false
|
||||
Setting.registry_country_code = 'US'
|
||||
|
||||
|
@ -29,7 +27,7 @@ class ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
class ActionDispatch::IntegrationTest
|
||||
class ApplicationIntegrationTest < ActionDispatch::IntegrationTest
|
||||
include Capybara::DSL
|
||||
include Capybara::Minitest::Assertions
|
||||
include AbstractController::Translation
|
||||
|
@ -41,3 +39,5 @@ class ActionDispatch::IntegrationTest
|
|||
Capybara.use_default_driver
|
||||
end
|
||||
end
|
||||
|
||||
require 'application_system_test_case'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue