summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-06 16:20:21 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-11 11:39:04 -0300
commite46a4aabd925e0182c31976b5d28c38b9a8a0872 (patch)
tree8400151d252bb7d2bb7010be56c5bef196d5b311 /spec/factories
parent95a5cc9285a8583988ece697ebdb948730b5db55 (diff)
downloadgitlab-ce-e46a4aabd925e0182c31976b5d28c38b9a8a0872.tar.gz
Update Boards::CreateService to handle with the has_many association
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/boards.rb5
-rw-r--r--spec/factories/projects.rb8
2 files changed, 5 insertions, 8 deletions
diff --git a/spec/factories/boards.rb b/spec/factories/boards.rb
index 35c4a0b6f08..ec46146d9b5 100644
--- a/spec/factories/boards.rb
+++ b/spec/factories/boards.rb
@@ -1,5 +1,10 @@
FactoryGirl.define do
factory :board do
project factory: :empty_project
+
+ after(:create) do |board|
+ board.lists.create(list_type: :backlog)
+ board.lists.create(list_type: :done)
+ end
end
end
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb
index 331172445e4..719ef17f57e 100644
--- a/spec/factories/projects.rb
+++ b/spec/factories/projects.rb
@@ -124,12 +124,4 @@ FactoryGirl.define do
)
end
end
-
- factory :project_with_board, parent: :empty_project do
- after(:create) do |project|
- project.create_board
- project.board.lists.create(list_type: :backlog)
- project.board.lists.create(list_type: :done)
- end
- end
end