summaryrefslogtreecommitdiff
path: root/spec/factories/todos.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 11:59:59 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 12:39:27 -0200
commit3d52e139b13ad077286f2f9f46b7e98f43ad9564 (patch)
tree22c70561b0f64851d938e44661aafeed3a2c80b2 /spec/factories/todos.rb
parent408e010d65e7e2e2b64a694e12d44636d7d81dec (diff)
downloadgitlab-ce-3d52e139b13ad077286f2f9f46b7e98f43ad9564.tar.gz
Rename Tasks to Todos
Diffstat (limited to 'spec/factories/todos.rb')
-rw-r--r--spec/factories/todos.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/factories/todos.rb b/spec/factories/todos.rb
new file mode 100644
index 00000000000..bd85b1d798a
--- /dev/null
+++ b/spec/factories/todos.rb
@@ -0,0 +1,34 @@
+# == Schema Information
+#
+# Table name: todos
+#
+# id :integer not null, primary key
+# user_id :integer not null
+# project_id :integer not null
+# target_id :integer not null
+# target_type :string not null
+# author_id :integer
+# note_id :integer
+# action :integer not null
+# state :string not null
+# created_at :datetime
+# updated_at :datetime
+#
+
+FactoryGirl.define do
+ factory :todo do
+ project
+ author
+ user
+ target factory: :issue
+ action { Todo::ASSIGNED }
+
+ trait :assigned do
+ action { Todo::ASSIGNED }
+ end
+
+ trait :mentioned do
+ action { Todo::MENTIONED }
+ end
+ end
+end