2019-01-10 01:30:33 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-23 21:54:15 +08:00
|
|
|
FactoryBot.define do
|
2017-07-10 20:38:18 +08:00
|
|
|
factory :project do
|
2019-01-10 01:30:33 +08:00
|
|
|
sequence(:name) { |n| "My project-#{n}" }
|
|
|
|
association :created_by, factory: :user
|
|
|
|
team { create :team, created_by: created_by }
|
|
|
|
archived { false }
|
|
|
|
visibility { 'hidden' }
|
2017-07-10 20:38:18 +08:00
|
|
|
end
|
|
|
|
|
2017-07-28 16:14:50 +08:00
|
|
|
factory :project_user, class: User do
|
2017-07-10 20:38:18 +08:00
|
|
|
full_name Faker::Name.name
|
|
|
|
initials 'AD'
|
|
|
|
email Faker::Internet.email
|
|
|
|
password 'asdf1243'
|
|
|
|
password_confirmation 'asdf1243'
|
|
|
|
end
|
|
|
|
end
|