require 'rails_helper'
RSpec.describe GpgSignature do
describe 'associations' do
it { is_expected.to belong_to(:project) }
it { is_expected.to belong_to(:gpg_key) }
end
describe 'validation' do
subject { described_class.new }
it { is_expected.to validate_presence_of(:commit_sha) }
it { is_expected.to validate_presence_of(:project) }
it { is_expected.to validate_presence_of(:gpg_key_primary_keyid) }
end
end
-
Alexis Reigel authored
we need to store the keyid to be able to update the signature later in case the missing key is added later.
5d5fd4ba