mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 21:54:48 +02:00
Add fixture
This commit is contained in:
parent
fe02963773
commit
e0681eff63
2 changed files with 15 additions and 0 deletions
11
test/fixtures/registrars.yml
vendored
11
test/fixtures/registrars.yml
vendored
|
@ -35,3 +35,14 @@ not_in_use:
|
||||||
accounting_customer_code: any
|
accounting_customer_code: any
|
||||||
language: en
|
language: en
|
||||||
reference_no: 39
|
reference_no: 39
|
||||||
|
|
||||||
|
invalid:
|
||||||
|
name: ""
|
||||||
|
reg_no: any
|
||||||
|
code: another
|
||||||
|
email: any
|
||||||
|
country_code: US
|
||||||
|
vat_no: any
|
||||||
|
accounting_customer_code: any
|
||||||
|
language: en
|
||||||
|
reference_no: 42
|
||||||
|
|
|
@ -9,6 +9,10 @@ class RegistrarTest < ActiveSupport::TestCase
|
||||||
assert @registrar.valid?, proc { @registrar.errors.full_messages }
|
assert @registrar.valid?, proc { @registrar.errors.full_messages }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_invalid_fixture_is_invalid
|
||||||
|
assert registrars(:invalid).invalid?
|
||||||
|
end
|
||||||
|
|
||||||
def test_invalid_without_name
|
def test_invalid_without_name
|
||||||
@registrar.name = ''
|
@registrar.name = ''
|
||||||
assert @registrar.invalid?
|
assert @registrar.invalid?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue