Merge remote-tracking branch 'parent/stable-4.2' into kb-draft-5.25-lts
This commit is contained in:
commit
c33fea88b2
15 changed files with 68 additions and 38 deletions
|
@ -99,16 +99,11 @@ RSpec.describe ActivityPub::LinkedDataSignature do
|
|||
describe '#sign!' do
|
||||
subject { described_class.new(raw_json).sign!(sender) }
|
||||
|
||||
it 'returns a hash' do
|
||||
it 'returns a hash with a signature, the expected context, and the signature can be verified', :aggregate_failures do
|
||||
expect(subject).to be_a Hash
|
||||
end
|
||||
|
||||
it 'contains signature' do
|
||||
expect(subject['signature']).to be_a Hash
|
||||
expect(subject['signature']['signatureValue']).to be_present
|
||||
end
|
||||
|
||||
it 'can be verified again' do
|
||||
expect(Array(subject['@context'])).to include('https://w3id.org/security/v1')
|
||||
expect(described_class.new(subject).verify_actor!).to eq sender
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue