Read about our upcoming Code of Conduct on this issue

deploy_tokens.rb 283 Bytes
Newer Older
1
2
3
4
FactoryBot.define do
  factory :deploy_token do
    token { SecureRandom.hex(50) }
    sequence(:name) { |n| "PDT #{n}" }
Mayra Cabrera's avatar
Mayra Cabrera committed
5
6
    read_repository true
    read_registry true
7
8
9
10
11
12
13
14
    revoked false
    expires_at { 5.days.from_now }

    trait :revoked do
      revoked true
    end
  end
end