summaryrefslogtreecommitdiff
path: root/help/test/factories.rb
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-11-11 13:15:26 -0800
committerjessib <jessib@riseup.net>2013-11-11 13:15:26 -0800
commitd4d970095d0370d7d5744fdc0ebc7b8d9bbd1a4c (patch)
treeb035b29ccb465a75bfd019d46f037dc5de6fbc78 /help/test/factories.rb
parent8c19b447dec3982107f93ea1ae2626f844045249 (diff)
parent69a41bee2548fa8743dd3188b0ebfc84dac17062 (diff)
Merge pull request #109 from azul/feature/clear-all-data-of-deleted-user
Feature/clear data of deleted user
Diffstat (limited to 'help/test/factories.rb')
-rw-r--r--help/test/factories.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/help/test/factories.rb b/help/test/factories.rb
index 5b38952..bce3af1 100644
--- a/help/test/factories.rb
+++ b/help/test/factories.rb
@@ -2,8 +2,16 @@ FactoryGirl.define do
factory :ticket do
title { Faker::Lorem.sentence }
- comments_attributes do
- { "0" => { "body" => Faker::Lorem.sentences.join(" ") } }
+ email { Faker::Internet.email }
+
+ factory :ticket_with_comment do
+ comments_attributes do
+ { "0" => { "body" => Faker::Lorem.sentences.join(" ") } }
+ end
+ end
+
+ factory :ticket_with_creator do
+ created_by { FactoryGirl.create(:user).id }
end
end