Skip to content

Commit

Permalink
Extract zip and check content
Browse files Browse the repository at this point in the history
This commit improves the test coverage by extracting the zip and
asserting the number of entries.
  • Loading branch information
miguelfteixeira committed Jan 7, 2025
1 parent 05b7ec4 commit 364253f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ group :development, :test do
gem 'rake', '~> 13.0.1'
gem 'pry-byebug'
gem 'rubocop', '~> 0.66.0'
gem 'rubyzip', '~> 2.3.2'
end

gem "faraday-follow_redirects", "~> 0.3.0"
7 changes: 5 additions & 2 deletions spec/integrations/workflow_run_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require_relative '../shared_contexts/with_workflow_run'
require 'zip'

describe Onfido::WorkflowRun do
describe 'Workflow run' do
Expand Down Expand Up @@ -80,10 +81,12 @@
expect(file.size).to be > 0
end

it 'downloads evidence folder' do
it 'downloads an evidence folder' do
file = onfido_api.download_evidence_folder(workflow_run_id)

expect(file.size).to be > 0
Zip::File.open(file.path) do |zip|
expect(zip.entries.size).to be > 0
end
end
end
end
Expand Down

0 comments on commit 364253f

Please sign in to comment.