Update validations test
This commit is contained in:
parent
0f592d4bf5
commit
3919630d9a
|
@ -101,14 +101,13 @@ it 'should validate uniqueness', (test) ->
|
||||||
dmk.isValid (valid) ->
|
dmk.isValid (valid) ->
|
||||||
test.ok valid
|
test.ok valid
|
||||||
dmk.save ->
|
dmk.save ->
|
||||||
dmk.city = 'Bangkok, Don Muang'
|
dmk.updateAttributes city: 'Bangkok, Don Muang', (err) ->
|
||||||
dmk.isValid (valid) ->
|
test.ok !err
|
||||||
test.ok valid
|
dmk.save ->
|
||||||
dmk.save ->
|
dmk.code = 'BKK'
|
||||||
dmk.code = 'BKK'
|
|
||||||
dmk.isValid (valid) ->
|
|
||||||
test.ok !valid
|
|
||||||
dmk.code = 'DMK'
|
|
||||||
dmk.isValid (valid) ->
|
dmk.isValid (valid) ->
|
||||||
test.ok valid
|
test.ok !valid
|
||||||
test.done()
|
dmk.code = 'DMK'
|
||||||
|
dmk.isValid (valid) ->
|
||||||
|
test.ok valid
|
||||||
|
test.done()
|
||||||
|
|
Loading…
Reference in New Issue