summaryrefslogtreecommitdiff
path: root/engines/support/test/factories.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-04-11 10:03:19 +0200
committerAzul <azul@leap.se>2014-04-11 10:07:23 +0200
commit636692f9921bd695d726695d2d46c91f5a6e56f3 (patch)
treea7cc0b89007bd273ae7719f31c16e052a141fec7 /engines/support/test/factories.rb
parent32136605ddd405a0bf47f3b795b22fd4b49465b5 (diff)
move engines into engines directory
Also renamed help to support so it's harder to confuse it with documentation
Diffstat (limited to 'engines/support/test/factories.rb')
-rw-r--r--engines/support/test/factories.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/engines/support/test/factories.rb b/engines/support/test/factories.rb
new file mode 100644
index 0000000..be04f15
--- /dev/null
+++ b/engines/support/test/factories.rb
@@ -0,0 +1,18 @@
+FactoryGirl.define do
+
+ factory :ticket do
+ subject { Faker::Lorem.sentence }
+ 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
+
+end