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:
Maciej Szlosarczyk 2018-07-27 09:36:27 +03:00
parent 311aa503b3
commit 526a9ccd58
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
41 changed files with 42 additions and 42 deletions

View file

@ -3,7 +3,7 @@ require 'test_helper'
require 'database_cleaner'
require 'selenium/webdriver'
class ApplicationSystemTestCase < ActionDispatch::IntegrationTest; end
ApplicationSystemTestCase = Class.new(ApplicationIntegrationTest)
class JavaScriptApplicationSystemTestCase < ApplicationSystemTestCase
self.use_transactional_fixtures = false