mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +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
|
||||
language: en
|
||||
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 }
|
||||
end
|
||||
|
||||
def test_invalid_fixture_is_invalid
|
||||
assert registrars(:invalid).invalid?
|
||||
end
|
||||
|
||||
def test_invalid_without_name
|
||||
@registrar.name = ''
|
||||
assert @registrar.invalid?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue