summaryrefslogtreecommitdiff
path: root/users/test/factories.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-01-14 20:11:49 +0100
committerAzul <azul@leap.se>2013-01-14 20:11:49 +0100
commit8445e6b1a026c8f15fffae7544b84407e9bbce1b (patch)
tree859adf3bac117389595460916f45cfeab49f58cb /users/test/factories.rb
parentf75005e1bc15101f37d377b7ed06f877dc206ee0 (diff)
parentee2ea4ac8f4c6b0c3b09be6ed49e7a1faec7a9c1 (diff)
Merge branch 'master' into feature/fixing-routes-with-api
Diffstat (limited to 'users/test/factories.rb')
-rw-r--r--users/test/factories.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/users/test/factories.rb b/users/test/factories.rb
new file mode 100644
index 0000000..4bf7e62
--- /dev/null
+++ b/users/test/factories.rb
@@ -0,0 +1,20 @@
+FactoryGirl.define do
+
+ factory :user do
+ login { Faker::Internet.user_name }
+ password_verifier "1234ABCD"
+ password_salt "4321AB"
+
+ factory :user_with_settings do
+ email_forward { Faker::Internet.email }
+ email { Faker::Internet.user_name + '@' + APP_CONFIG[:domain] }
+ email_aliases_attributes do
+ {:a => Faker::Internet.user_name + '@' + APP_CONFIG[:domain]}
+ end
+ end
+
+ factory :admin_user do
+ is_admin? true
+ end
+ end
+end