summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorJames Edwards-Jones <jamedjo@gmail.com>2017-02-06 15:12:27 +0000
committerJames Edwards-Jones <jamedjo@gmail.com>2017-02-06 15:12:27 +0000
commitb988faaf85c8e68d501f242b980e5e79a00e2b15 (patch)
treefaffbfe623bfcbfe1c09bddac00b2cc879baff63 /spec/factories
parent5af4cae544c8526de63e639bd6c7db730526add3 (diff)
parent53db7d1d75e1d14cb20278bd0c1a75ce24a6626d (diff)
downloadgitlab-ce-b988faaf85c8e68d501f242b980e5e79a00e2b15.tar.gz
Merge branch 'master' into 'jej-pages-to-ce'jej-pages-to-ce
# Conflicts: # db/schema.rb
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/boards.rb1
-rw-r--r--spec/factories/events.rb12
-rw-r--r--spec/factories/lists.rb6
3 files changed, 12 insertions, 7 deletions
diff --git a/spec/factories/boards.rb b/spec/factories/boards.rb
index ec46146d9b5..a581725245a 100644
--- a/spec/factories/boards.rb
+++ b/spec/factories/boards.rb
@@ -3,7 +3,6 @@ FactoryGirl.define do
project factory: :empty_project
after(:create) do |board|
- board.lists.create(list_type: :backlog)
board.lists.create(list_type: :done)
end
end
diff --git a/spec/factories/events.rb b/spec/factories/events.rb
index bfe41f71b57..55727d6b62c 100644
--- a/spec/factories/events.rb
+++ b/spec/factories/events.rb
@@ -3,6 +3,18 @@ FactoryGirl.define do
project factory: :empty_project
author factory: :user
+ trait(:created) { action Event::CREATED }
+ trait(:updated) { action Event::UPDATED }
+ trait(:closed) { action Event::CLOSED }
+ trait(:reopened) { action Event::REOPENED }
+ trait(:pushed) { action Event::PUSHED }
+ trait(:commented) { action Event::COMMENTED }
+ trait(:merged) { action Event::MERGED }
+ trait(:joined) { action Event::JOINED }
+ trait(:left) { action Event::LEFT }
+ trait(:destroyed) { action Event::DESTROYED }
+ trait(:expired) { action Event::EXPIRED }
+
factory :closed_issue_event do
action { Event::CLOSED }
target factory: :closed_issue
diff --git a/spec/factories/lists.rb b/spec/factories/lists.rb
index 9e3f06c682c..2a2f3cca91c 100644
--- a/spec/factories/lists.rb
+++ b/spec/factories/lists.rb
@@ -6,12 +6,6 @@ FactoryGirl.define do
sequence(:position)
end
- factory :backlog_list, parent: :list do
- list_type :backlog
- label nil
- position nil
- end
-
factory :done_list, parent: :list do
list_type :done
label nil