summaryrefslogtreecommitdiff
path: root/users/test/unit/email_aliases_test.rb
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-01-14 11:50:54 -0800
committerjessib <jessib@leap.se>2013-01-14 11:50:54 -0800
commitc2f232d994b3ee01ff9d50da1e4f3798df2136f3 (patch)
tree5b7a11e9aed58357d2a38b248b965cd936de6888 /users/test/unit/email_aliases_test.rb
parentd81bf00ecd8bdfcddf50e4881428c917253326fe (diff)
parentee2ea4ac8f4c6b0c3b09be6ed49e7a1faec7a9c1 (diff)
Merge branch 'master' into feature/show_user. Added new tests.
Conflicts: users/test/functional/users_controller_test.rb
Diffstat (limited to 'users/test/unit/email_aliases_test.rb')
-rw-r--r--users/test/unit/email_aliases_test.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/users/test/unit/email_aliases_test.rb b/users/test/unit/email_aliases_test.rb
index 88f97f4..e3f060d 100644
--- a/users/test/unit/email_aliases_test.rb
+++ b/users/test/unit/email_aliases_test.rb
@@ -3,12 +3,8 @@ require 'test_helper'
class EmailAliasTest < ActiveSupport::TestCase
setup do
- @attribs = User.valid_attributes_hash
- User.find_by_login(@attribs[:login]).try(:destroy)
- @user = User.new(@attribs)
- @attribs.merge!(:login => "other_user")
- User.find_by_login(@attribs[:login]).try(:destroy)
- @other_user = User.create(@attribs)
+ @user = FactoryGirl.build :user
+ @other_user = FactoryGirl.build :user
@alias = "valid_alias@#{APP_CONFIG[:domain]}"
User.find_by_email_or_alias(@alias).try(:destroy)
end