Add a factory to the Geo::ProjectRegistry model

parent ef69cea4
FactoryGirl.define do
factory :geo_project_registry, class: Geo::ProjectRegistry do
project factory: :empty_project
last_repository_synced_at nil
last_repository_successful_sync_at nil
last_wiki_synced_at nil
last_wiki_successful_sync_at nil
resync_repository true
resync_wiki true
trait :dirty do
resync_repository true
resync_wiki true
end
trait :repository_dirty do
resync_repository true
resync_wiki false
end
trait :wiki_dirty do
resync_repository false
resync_wiki true
end
trait :synced do
last_repository_synced_at { 5.days.ago }
last_repository_successful_sync_at { 5.days.ago }
last_wiki_synced_at { 5.days.ago }
last_wiki_successful_sync_at { 5.days.ago }
resync_repository false
resync_wiki false
end
trait :sync_failed do
last_repository_synced_at { 5.days.ago }
last_repository_successful_sync_at nil
last_wiki_synced_at { 5.days.ago }
last_wiki_successful_sync_at nil
resync_repository true
resync_wiki true
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment