summaryrefslogtreecommitdiff
path: root/engines/support/test/factories.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-05-20 11:18:28 +0200
committerAzul <azul@leap.se>2014-05-26 12:59:26 +0200
commit29fd85f605ee41275e383681a6b3e8ea0615d525 (patch)
tree2411faf97d0258acbe600ce83615e360a22d26a6 /engines/support/test/factories.rb
parent730e31017109994c24db431fde12f575ed5c1467 (diff)
splitting up long functional test case
Diffstat (limited to 'engines/support/test/factories.rb')
-rw-r--r--engines/support/test/factories.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/support/test/factories.rb b/engines/support/test/factories.rb
index be04f15..bcf41e8 100644
--- a/engines/support/test/factories.rb
+++ b/engines/support/test/factories.rb
@@ -6,13 +6,23 @@ FactoryGirl.define do
factory :ticket_with_comment do
comments_attributes do
- { "0" => { "body" => Faker::Lorem.sentences.join(" ") } }
+ { "0" => {
+ "body" => Faker::Lorem.sentences.join(" "),
+ "posted_by" => created_by
+ } }
end
end
factory :ticket_with_creator do
created_by { FactoryGirl.create(:user).id }
end
+
+ end
+
+ # TicketComments can not be saved. so only use this with build
+ # and add to a ticket afterwards
+ factory :ticket_comment do
+ body { Faker::Lorem.sentences.join(" ") }
end
end