summaryrefslogtreecommitdiff
path: root/spec/factories/issues.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-02-16 22:55:24 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-03-04 15:26:51 -0500
commit6df45eb4630d3eef4f232398de405b169c3c6876 (patch)
tree1f059ced536939bc14ea5d86fba8afce04537d40 /spec/factories/issues.rb
parent5de46014d74c1805b6bb090f5b2abebd6fb1f399 (diff)
downloadgitlab-ce-6df45eb4630d3eef4f232398de405b169c3c6876.tar.gz
Move all factory definitions to their own file
Diffstat (limited to 'spec/factories/issues.rb')
-rw-r--r--spec/factories/issues.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/factories/issues.rb b/spec/factories/issues.rb
new file mode 100644
index 00000000000..722095de590
--- /dev/null
+++ b/spec/factories/issues.rb
@@ -0,0 +1,18 @@
+FactoryGirl.define do
+ factory :issue do
+ title
+ author
+ project
+
+ trait :closed do
+ state :closed
+ end
+
+ trait :reopened do
+ state :reopened
+ end
+
+ factory :closed_issue, traits: [:closed]
+ factory :reopened_issue, traits: [:reopened]
+ end
+end