debian-mirror-gitlab/spec/factories/todos.rb

35 lines
726 B
Ruby
Raw Normal View History

2016-04-02 18:10:28 +05:30
# == 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