Merge commit 'a5b4a2b7e7
' into kb-draft-5.21-lts
This commit is contained in:
commit
6896542a76
33 changed files with 338 additions and 109 deletions
|
@ -56,9 +56,11 @@ RSpec.describe BackupService, type: :service do
|
|||
end
|
||||
|
||||
def expect_outbox_export
|
||||
json = export_json(:outbox)
|
||||
body = export_json_raw(:outbox)
|
||||
json = Oj.load(body)
|
||||
|
||||
aggregate_failures do
|
||||
expect(body.scan('@context').count).to eq 1
|
||||
expect(json['@context']).to_not be_nil
|
||||
expect(json['type']).to eq 'OrderedCollection'
|
||||
expect(json['totalItems']).to eq 3
|
||||
|
@ -87,8 +89,12 @@ RSpec.describe BackupService, type: :service do
|
|||
end
|
||||
end
|
||||
|
||||
def export_json_raw(type)
|
||||
read_zip_file(backup, "#{type}.json")
|
||||
end
|
||||
|
||||
def export_json(type)
|
||||
Oj.load(read_zip_file(backup, "#{type}.json"))
|
||||
Oj.load(export_json_raw(type))
|
||||
end
|
||||
|
||||
def include_create_item(status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue