summaryrefslogtreecommitdiff
path: root/users/test/unit/email_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-12-13 16:13:32 +0100
committerAzul <azul@leap.se>2012-12-13 17:15:41 +0100
commitaed03c04270bc9b7d48048ffb2f24fecc993c7ac (patch)
treeaee41c3bb73bf5167fb5b161ea159f82195d4535 /users/test/unit/email_test.rb
parent577c3d8149acbd483120847b994582268f93c0b3 (diff)
refactor: changed add_email to add_email_alias
that's what it does. Changed all tests to use it instead of the attributes method
Diffstat (limited to 'users/test/unit/email_test.rb')
-rw-r--r--users/test/unit/email_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/users/test/unit/email_test.rb b/users/test/unit/email_test.rb
index cba88a2..1e216d6 100644
--- a/users/test/unit/email_test.rb
+++ b/users/test/unit/email_test.rb
@@ -20,9 +20,9 @@ class EmailTest < ActiveSupport::TestCase
test "email aliases need to be unique" do
email_alias = "valid_alias@domain.net"
- @other_user.attributes = {:email_aliases_attributes => {"0" => {:email => email_alias}}}
+ @other_user.add_email_alias email_alias
@other_user.save
- @user.attributes = {:email_aliases_attributes => {"0" => {:email => email_alias}}}
+ @user.add_email_alias email_alias
assert @user.changed?
assert !@user.save
# TODO handle errors
@@ -32,7 +32,7 @@ class EmailTest < ActiveSupport::TestCase
email_alias = "valid_alias@domain.net"
@other_user.email = email_alias
@other_user.save
- @user.attributes = {:email_aliases_attributes => {"0" => {:email => email_alias}}}
+ @user.add_email_alias email_alias
assert @user.changed?
assert !@user.save
end