diff options
Diffstat (limited to 'spec/models/commit_signatures/x509_commit_signature_spec.rb')
-rw-r--r-- | spec/models/commit_signatures/x509_commit_signature_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/models/commit_signatures/x509_commit_signature_spec.rb b/spec/models/commit_signatures/x509_commit_signature_spec.rb index b971fd078e2..cceb96ec70d 100644 --- a/spec/models/commit_signatures/x509_commit_signature_spec.rb +++ b/spec/models/commit_signatures/x509_commit_signature_spec.rb @@ -23,6 +23,7 @@ RSpec.describe CommitSignatures::X509CommitSignature do it_behaves_like 'having unique enum values' it_behaves_like 'commit signature' + it_behaves_like 'signature with type checking', :x509 describe 'validation' do it { is_expected.to validate_presence_of(:x509_certificate_id) } @@ -37,12 +38,12 @@ RSpec.describe CommitSignatures::X509CommitSignature do let!(:user) { create(:user, email: X509Helpers::User1.certificate_email) } it 'returns user' do - expect(described_class.safe_create!(attributes).user).to eq(user) + expect(described_class.safe_create!(attributes).signed_by_user).to eq(user) end end it 'if email is not assigned to a user, return nil' do - expect(described_class.safe_create!(attributes).user).to be_nil + expect(described_class.safe_create!(attributes).signed_by_user).to be_nil end end end |