summaryrefslogtreecommitdiff
path: root/engines/support/test/factories.rb
diff options
context:
space:
mode:
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