Files
warp_engine/spec/factories/application_tokens.rb
T
2026-08-05 20:12:35 +02:00

22 lines
543 B
Ruby

# A TestOwner csak a dummy appban létezik — host-oldali használatnál az owner-t
# felül kell írni (pl. owner: create(:admin_user)).
FactoryBot.define do
factory :test_owner, class: "TestOwner" do
name { "test owner" }
end
factory :application_token, class: "WarpEngine::ApplicationToken" do
name { "CI token" }
scopes { [ "update" ] }
association :owner, factory: :test_owner
trait :expired do
expires_at { 1.hour.ago }
end
trait :unrestricted do
unrestricted { true }
end
end
end