diff options
Diffstat (limited to 'spec/factories/keys.rb')
-rw-r--r-- | spec/factories/keys.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/factories/keys.rb b/spec/factories/keys.rb index f6f06a99494..4bd41c1faa1 100644 --- a/spec/factories/keys.rb +++ b/spec/factories/keys.rb @@ -30,7 +30,15 @@ FactoryBot.define do key { SSHData::PrivateKey::RSA.generate(3072, unsafe_allow_small_key: true).public_key.openssh } end - factory :deploy_key, class: 'DeployKey' + factory :deploy_key, class: 'DeployKey' do + trait :private do + public { false } + end + + trait :public do + public { true } + end + end factory :group_deploy_key, class: 'GroupDeployKey' do user |