mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +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,25 +0,0 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrantDomainsTest < ActionDispatch::IntegrationTest
|
||||
setup do
|
||||
sign_in users(:registrant)
|
||||
|
||||
Setting.days_to_keep_business_registry_cache = 1
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
end
|
||||
|
||||
def test_shows_domains_where_current_user_is_registrant
|
||||
visit registrant_domains_url
|
||||
assert_text 'shop.test'
|
||||
end
|
||||
|
||||
def test_shows_domains_where_current_user_is_contact_person
|
||||
visit registrant_domains_url
|
||||
assert_text 'airport.test'
|
||||
end
|
||||
|
||||
def test_shows_domains_where_current_user_has_associated_organizations
|
||||
visit registrant_domains_url
|
||||
assert_text 'library.test'
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue