Commit 85c6652a authored by Rubén Dávila's avatar Rubén Dávila

Fix some broken specs

parent c50725fe
......@@ -119,7 +119,7 @@ class GpgKey < ActiveRecord::Base
def generate_subkeys
gpg_subkeys = Gitlab::Gpg.subkeys_from_key(key)
gpg_subkeys[primary_keyid].each do |subkey_data|
gpg_subkeys[primary_keyid]&.each do |subkey_data|
subkeys.create!(keyid: subkey_data[:keyid], fingerprint: subkey_data[:fingerprint])
end
end
......
......@@ -4,7 +4,7 @@ FactoryGirl.define do
factory :gpg_key_subkey do
gpg_key
keyid { gpg_key.subkeys.last.keyid }
fingerprint { gpg_key.subkeys.last.fingerprint }
sequence(:keyid) { |n| "keyid-#{n}" }
sequence(:fingerprint) { |n| "fingerprint-#{n}" }
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