mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +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
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class APIDomainContactsTest < ActionDispatch::IntegrationTest
|
||||
class APIDomainContactsTest < ApplicationIntegrationTest
|
||||
def test_replace_all_tech_contacts_of_the_current_registrar
|
||||
patch '/repp/v1/domains/contacts', { current_contact_id: 'william-001',
|
||||
new_contact_id: 'john-001' },
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class APIDomainTransfersTest < ActionDispatch::IntegrationTest
|
||||
class APIDomainTransfersTest < ApplicationIntegrationTest
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
@new_registrar = registrars(:goodnames)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'test_helper'
|
||||
|
||||
class APINameserversPutTest < ActionDispatch::IntegrationTest
|
||||
class APINameserversPutTest < ApplicationIntegrationTest
|
||||
def test_replaces_registrar_nameservers
|
||||
old_nameserver_ids = [nameservers(:shop_ns1).id,
|
||||
nameservers(:airport_ns1).id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue