summaryrefslogtreecommitdiff
path: root/spec/integration
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-08-04 12:22:08 -0600
committermo khan <mo.khan@gmail.com>2020-08-04 18:11:01 -0600
commit3ee6d1113b57f9fdc3b093a75d5c79ef04078b21 (patch)
treeef205f1d6ec5d8aefa0b50a60ac620e3f8608068 /spec/integration
parented6e39123472fecf4eb8fef1e75db28a3b4d1ff2 (diff)
Add spec to reproduce error in offline env
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/php/composer_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/integration/php/composer_spec.rb b/spec/integration/php/composer_spec.rb
index 0fb09ee..7a1c274 100644
--- a/spec/integration/php/composer_spec.rb
+++ b/spec/integration/php/composer_spec.rb
@@ -118,4 +118,16 @@ RSpec.describe "composer" do
expect(subject.licenses_for('monolog/monolog')).to match_array(['MIT'])
end
end
+
+ context "when scanning a project with a lock file and sourced from an unreachable network location" do
+ before do
+ runner.mount(dir: fixture_file('php/composer/unreachable-network'))
+ end
+
+ it 'parses the informatio from the lockfile' do
+ expect(subject).to match_schema
+ expect(subject.dependency_names).to match_array(['monolog/monolog'])
+ expect(subject.licenses_for('monolog/monolog')).to match_array(['MIT'])
+ end
+ end
end