summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-18 11:51:53 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 12:12:05 -0200
commitbc54300ce5329b66d0ba726f814d9e761e782668 (patch)
treeb239efa220ef576267216064026fcf6dd5cc6aab
parent139c513da609d2def0d4122789e94fe29b557e67 (diff)
downloadgitlab-ce-bc54300ce5329b66d0ba726f814d9e761e782668.tar.gz
Fix task factory
-rw-r--r--app/models/task.rb2
-rw-r--r--spec/factories/tasks.rb5
-rw-r--r--spec/models/task_spec.rb2
3 files changed, 6 insertions, 3 deletions
diff --git a/app/models/task.rb b/app/models/task.rb
index 38c6637e456..cc1f501a7ec 100644
--- a/app/models/task.rb
+++ b/app/models/task.rb
@@ -9,7 +9,7 @@
# target_type :string not null
# author_id :integer
# note_id :integer
-# action :integer
+# action :integer not null
# state :string not null
# created_at :datetime
# updated_at :datetime
diff --git a/spec/factories/tasks.rb b/spec/factories/tasks.rb
index b31db8a7d8b..4df489fa4c9 100644
--- a/spec/factories/tasks.rb
+++ b/spec/factories/tasks.rb
@@ -8,7 +8,8 @@
# target_id :integer not null
# target_type :string not null
# author_id :integer
-# action :integer
+# note_id :integer
+# action :integer not null
# state :string not null
# created_at :datetime
# updated_at :datetime
@@ -19,6 +20,8 @@ FactoryGirl.define do
project
author
user
+ target factory: :issue
+ action { Task::ASSIGNED }
trait :assigned do
action { Task::ASSIGNED }
diff --git a/spec/models/task_spec.rb b/spec/models/task_spec.rb
index 2871e02aa4d..916f618471f 100644
--- a/spec/models/task_spec.rb
+++ b/spec/models/task_spec.rb
@@ -9,7 +9,7 @@
# target_type :string not null
# author_id :integer
# note_id :integer
-# action :integer
+# action :integer not null
# state :string not null
# created_at :datetime
# updated_at :datetime