Welcome to mirror list, hosted at ThFree Co, Russian Federation.

service_access_tokens.rb « ai « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 307b87dc8c8bbe64e1e3c56c201a86de60c28f8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

FactoryBot.define do
  factory :service_access_token, class: 'CloudConnector::ServiceAccessToken' do
    token { SecureRandom.alphanumeric(10) }
    expires_at { Time.current + 1.day }

    trait :active do
      expires_at { Time.current + 1.day }
    end

    trait :expired do
      expires_at { Time.current - 1.day }
    end
  end
end