Update fixtures

This commit is contained in:
Artur Beljajev 2018-01-20 22:22:30 +02:00
parent ce58feba6e
commit 013122335d
9 changed files with 17 additions and 28 deletions

View file

@ -3,7 +3,7 @@ require 'test_helper'
class RegistrarsControllerTest < ActionDispatch::IntegrationTest class RegistrarsControllerTest < ActionDispatch::IntegrationTest
def setup def setup
login_as users(:admin) login_as users(:admin)
@registrar = registrars(:valid) @registrar = registrars(:bestnames)
end end
def test_updates_website def test_updates_website

View file

@ -3,7 +3,7 @@ john:
ident: 1234 ident: 1234
ident_type: priv ident_type: priv
ident_country_code: US ident_country_code: US
registrar: acme registrar: bestnames
code: john-001 code: john-001
jane: jane:
@ -11,13 +11,13 @@ jane:
ident: 1234 ident: 1234
ident_type: priv ident_type: priv
ident_country_code: US ident_country_code: US
registrar: acme registrar: bestnames
code: jane-001 code: jane-001
acme_ltd: acme_ltd:
name: Acme Ltd name: Acme Ltd
ident: 1234 ident: 1234
ident_type: org ident_type: org
registrar: acme registrar: bestnames
ident_country_code: US ident_country_code: US
code: acme-ltd-001 code: acme-ltd-001

View file

@ -1,20 +1,20 @@
shop: shop:
name: shop.test name: shop.test
registrar: valid registrar: bestnames
registrant: john registrant: john
auth_info: 65078d5 auth_info: 65078d5
valid_to: 2010-07-05 valid_to: 2010-07-05
airport: airport:
name: airport.test name: airport.test
registrar: valid registrar: bestnames
registrant: john registrant: john
auth_info: 55438j5 auth_info: 55438j5
valid_to: 2010-07-05 valid_to: 2010-07-05
library: library:
name: library.test name: library.test
registrar: valid registrar: bestnames
registrant: acme_ltd registrant: acme_ltd
auth_info: 45118f5 auth_info: 45118f5
valid_to: 2010-07-05 valid_to: 2010-07-05

View file

@ -1,3 +1,3 @@
shop: shop:
registrar: valid registrar: bestnames
data: <%= Base64.encode64(Marshal.dump({api_user_id: ActiveRecord::Fixtures.identify(:api)})) %> data: <%= Base64.encode64(Marshal.dump({api_user_id: ActiveRecord::Fixtures.identify(:api)})) %>

View file

@ -1,21 +1,9 @@
DEFAULTS: &DEFAULTS bestnames:
name: Acme Ltd name: Best Names Ltd
reg_no: 1234 reg_no: 1234
code: bestnames
country_code: US country_code: US
email: acme@example.com email: info@bestnames.test
code: 1234
accounting_customer_code: ACCOUNT001 accounting_customer_code: ACCOUNT001
language: en language: en
valid:
<<: *DEFAULTS
complete:
<<: *DEFAULTS
name: 2
reg_no: 2
code: 2
website: example.com
email: info@example.com
billing_email: billing@example.com billing_email: billing@example.com
vat_no: US12345

View file

@ -1,7 +1,8 @@
api: api:
username: test username: test
password: test
type: ApiUser type: ApiUser
registrar: valid registrar: bestnames
roles: roles:
- super - super

View file

@ -3,7 +3,7 @@ require 'test_helper'
class EditRegistrarTest < ActionDispatch::IntegrationTest class EditRegistrarTest < ActionDispatch::IntegrationTest
def setup def setup
login_as users(:admin) login_as users(:admin)
@registrar = registrars(:valid) @registrar = registrars(:bestnames)
end end
def test_updates_registrar def test_updates_registrar

View file

@ -5,7 +5,7 @@ class ShowRegistrarTest < ActionDispatch::IntegrationTest
def setup def setup
login_as users(:admin) login_as users(:admin)
@registrar = registrars(:complete) @registrar = registrars(:bestnames)
visit admin_registrar_path(@registrar) visit admin_registrar_path(@registrar)
end end

View file

@ -2,7 +2,7 @@ require 'test_helper'
class RegistrarTest < ActiveSupport::TestCase class RegistrarTest < ActiveSupport::TestCase
def setup def setup
@registrar = registrars(:valid) @registrar = registrars(:bestnames)
end end
def test_valid def test_valid