From e0d31118d6e4110d2c280afa9415cfe9def29deb Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 29 May 2014 10:04:07 +0200 Subject: hand on errors from Email to Identity to User errors.each iterates through all errors for all attrbibutes nicely. --- test/unit/identity_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/unit/identity_test.rb') diff --git a/test/unit/identity_test.rb b/test/unit/identity_test.rb index 9c938f8..54c0657 100644 --- a/test/unit/identity_test.rb +++ b/test/unit/identity_test.rb @@ -107,6 +107,7 @@ class IdentityTest < ActiveSupport::TestCase other_user = find_record :user taken = Identity.build_for other_user, address: id.address assert !taken.valid? + assert_equal ["has already been taken"], taken.errors[:address] Identity.destroy_all_disabled end -- cgit v1.2.3