mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
parent
b58f0e891b
commit
67082374ff
8 changed files with 82 additions and 11 deletions
8
test/fixtures/business_registry_caches.yml
vendored
Normal file
8
test/fixtures/business_registry_caches.yml
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
first:
|
||||
ident: 1234
|
||||
ident_country_code: US
|
||||
associated_businesses:
|
||||
- 1234
|
||||
retrieved_on: 2010-07-05 10:30
|
||||
created_at: 2010-07-05 10:30
|
||||
updated_at: 2010-07-05 10:30
|
20
test/fixtures/contacts.yml
vendored
Normal file
20
test/fixtures/contacts.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
john:
|
||||
name: John
|
||||
ident: 1234
|
||||
ident_type: priv
|
||||
ident_country_code: US
|
||||
registrar: acme
|
||||
|
||||
jane:
|
||||
name: Jane
|
||||
ident: 1234
|
||||
ident_type: priv
|
||||
ident_country_code: US
|
||||
registrar: acme
|
||||
|
||||
acme_ltd:
|
||||
name: Acme Ltd.
|
||||
ident: 1234
|
||||
ident_type: org
|
||||
registrar: acme
|
||||
ident_country_code: US
|
4
test/fixtures/domain_contacts.yml
vendored
Normal file
4
test/fixtures/domain_contacts.yml
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
two_jane:
|
||||
domain: two
|
||||
contact: jane
|
||||
type: AdminDomainContact
|
14
test/fixtures/domains.yml
vendored
Normal file
14
test/fixtures/domains.yml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
one:
|
||||
name: one.test
|
||||
registrar: acme
|
||||
registrant: john
|
||||
|
||||
two:
|
||||
name: two.test
|
||||
registrar: acme
|
||||
registrant: john
|
||||
|
||||
three:
|
||||
name: three.test
|
||||
registrar: acme
|
||||
registrant: acme_ltd
|
3
test/fixtures/registrars.yml
vendored
3
test/fixtures/registrars.yml
vendored
|
@ -10,6 +10,9 @@ DEFAULTS: &DEFAULTS
|
|||
valid:
|
||||
<<: *DEFAULTS
|
||||
|
||||
acme:
|
||||
<<: *DEFAULTS
|
||||
|
||||
complete:
|
||||
<<: *DEFAULTS
|
||||
name: 2
|
||||
|
|
4
test/fixtures/users.yml
vendored
4
test/fixtures/users.yml
vendored
|
@ -14,3 +14,7 @@ admin:
|
|||
country_code: US
|
||||
roles:
|
||||
- admin
|
||||
|
||||
registrant:
|
||||
type: RegistrantUser
|
||||
registrant_ident: US-1234
|
||||
|
|
25
test/integration/registrant/domains_test.rb
Normal file
25
test/integration/registrant/domains_test.rb
Normal file
|
@ -0,0 +1,25 @@
|
|||
require 'test_helper'
|
||||
|
||||
class DomainsTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
login_as 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 'one.test'
|
||||
end
|
||||
|
||||
def test_shows_domains_where_current_user_is_contact_person
|
||||
visit registrant_domains_url
|
||||
assert_text 'two.test'
|
||||
end
|
||||
|
||||
def test_shows_domains_where_current_user_has_associated_organizations
|
||||
visit registrant_domains_url
|
||||
assert_text 'three.test'
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue