2016-02-15 17:26:30 -05:00
|
|
|
# == Schema Information
|
|
|
|
#
|
2016-02-20 08:59:59 -05:00
|
|
|
# Table name: todos
|
2016-02-15 17:26:30 -05:00
|
|
|
#
|
|
|
|
# id :integer not null, primary key
|
|
|
|
# user_id :integer not null
|
|
|
|
# project_id :integer not null
|
2016-03-16 20:02:20 -04:00
|
|
|
# target_id :integer
|
2016-02-15 17:26:30 -05:00
|
|
|
# target_type :string not null
|
|
|
|
# author_id :integer
|
2016-02-18 08:51:53 -05:00
|
|
|
# action :integer not null
|
2016-02-15 17:26:30 -05:00
|
|
|
# state :string not null
|
|
|
|
# created_at :datetime
|
|
|
|
# updated_at :datetime
|
2016-03-16 20:02:20 -04:00
|
|
|
# note_id :integer
|
|
|
|
# commit_id :string
|
2016-02-15 17:26:30 -05:00
|
|
|
#
|
|
|
|
|
|
|
|
FactoryGirl.define do
|
2016-02-20 08:59:59 -05:00
|
|
|
factory :todo do
|
2016-02-15 17:26:30 -05:00
|
|
|
project
|
|
|
|
author
|
|
|
|
user
|
2016-02-18 08:51:53 -05:00
|
|
|
target factory: :issue
|
2016-02-20 08:59:59 -05:00
|
|
|
action { Todo::ASSIGNED }
|
2016-02-15 21:26:33 -05:00
|
|
|
|
2016-02-17 17:04:14 -05:00
|
|
|
trait :assigned do
|
2016-02-20 08:59:59 -05:00
|
|
|
action { Todo::ASSIGNED }
|
2016-02-15 21:26:33 -05:00
|
|
|
end
|
|
|
|
|
2016-02-17 17:04:14 -05:00
|
|
|
trait :mentioned do
|
2016-02-20 08:59:59 -05:00
|
|
|
action { Todo::MENTIONED }
|
2016-02-15 21:26:33 -05:00
|
|
|
end
|
2016-03-16 19:31:30 -04:00
|
|
|
|
|
|
|
trait :on_commit do
|
|
|
|
commit_id RepoHelpers.sample_commit.id
|
|
|
|
target_type "Commit"
|
|
|
|
end
|
2016-02-15 17:26:30 -05:00
|
|
|
end
|
|
|
|
end
|