summaryrefslogtreecommitdiff
path: root/users/test/factories.rb
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2013-01-17 10:39:15 -0800
committerjessib <jessib@leap.se>2013-01-17 10:39:15 -0800
commit7d7741f7d26c3ae7ee1dc347a6b1a1142a3c2824 (patch)
tree5ec11b9600d4330ec94f56dda779634cd7dcae1b /users/test/factories.rb
parent2485527650c4832d764d318e91c10bafde8b8ae5 (diff)
parentb550cd14f33b9664fe6b547dc56107fae7d12caf (diff)
Merge branch 'master' into feature/unauthenticated_tickets
Conflicts: help/app/views/tickets/_comment.html.haml help/app/views/tickets/_new_comment.html.haml
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