From 3919630d9acdd7113797234bbad89c347149c2a7 Mon Sep 17 00:00:00 2001 From: Anatoliy Chakkaev Date: Tue, 22 Jan 2013 03:48:12 +0700 Subject: [PATCH] Update validations test --- test/validations_test.coffee | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/test/validations_test.coffee b/test/validations_test.coffee index 50a5fde4..22f158e0 100644 --- a/test/validations_test.coffee +++ b/test/validations_test.coffee @@ -101,14 +101,13 @@ it 'should validate uniqueness', (test) -> dmk.isValid (valid) -> test.ok valid dmk.save -> - dmk.city = 'Bangkok, Don Muang' - dmk.isValid (valid) -> - test.ok valid - dmk.save -> - dmk.code = 'BKK' - dmk.isValid (valid) -> - test.ok !valid - dmk.code = 'DMK' + dmk.updateAttributes city: 'Bangkok, Don Muang', (err) -> + test.ok !err + dmk.save -> + dmk.code = 'BKK' dmk.isValid (valid) -> - test.ok valid - test.done() + test.ok !valid + dmk.code = 'DMK' + dmk.isValid (valid) -> + test.ok valid + test.done()