fix(spec): update spec with new timestamp

This commit is contained in:
simon lehericey 2022-12-06 11:59:09 +01:00 committed by Paul Chavard
parent 172a9d5599
commit c085c7820f
4 changed files with 5 additions and 5 deletions

View file

@ -1 +1 @@
{"dossier1": "hash1", "dossier2": "hash2"}
{"1":"hash1","2":"hash2"}

Binary file not shown.

View file

@ -4,13 +4,13 @@ describe ASN1::Timestamp do
describe '.timestamp_time' do
subject { described_class.signature_time(asn1timestamp) }
it { is_expected.to eq Time.zone.parse('2019-04-30 15:30:20 UTC') }
it { is_expected.to eq Time.zone.parse('2022-12-06 09:11:17Z') }
end
describe '.timestamp_signed_data' do
subject { described_class.signed_digest(asn1timestamp) }
let(:data) { Digest::SHA256.hexdigest('CECI EST UN BLOB') }
let(:data) { Digest::SHA256.hexdigest('{"1":"hash1","2":"hash2"}') }
it { is_expected.to eq data }
end

View file

@ -73,8 +73,8 @@ RSpec.describe BillSignature, type: :model do
describe 'check_signature_contents' do
let(:signature) { File.open('spec/fixtures/files/bill_signature/signature.der') }
let(:signature_date) { DateTime.parse('2019-04-30 15:30:20') }
let(:signature_digest) { Digest::SHA256.hexdigest('CECI EST UN BLOB') }
let(:signature_date) { DateTime.parse('2022-12-06 11:00:00') }
let(:signature_digest) { Digest::SHA256.hexdigest('{"1":"hash1","2":"hash2"}') }
let(:current_date) { Time.zone.now }
before do