summaryrefslogtreecommitdiff
path: root/spec/integration/cli
diff options
context:
space:
mode:
authorcan eldem <eldemcan@gmail.com>2020-04-11 20:59:38 +0100
committercan eldem <eldemcan@gmail.com>2020-04-11 21:23:25 +0100
commit4dee47a1c9f87cb919b30e78631dfc6a21799c90 (patch)
tree6f894fce2883a1f2b98060e440faf854973ca831 /spec/integration/cli
parent1e07313914cf93d630e74a20544bfe0678e1ef74 (diff)
Add composer.lock support
Diffstat (limited to 'spec/integration/cli')
-rw-r--r--spec/integration/cli/scan_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/integration/cli/scan_spec.rb b/spec/integration/cli/scan_spec.rb
index 24c9a2d..20d08d1 100644
--- a/spec/integration/cli/scan_spec.rb
+++ b/spec/integration/cli/scan_spec.rb
@@ -86,4 +86,11 @@ RSpec.describe '`spandx scan` command', type: :cli do
output = `spandx scan #{fixture_file('js/yarn.lock')}`
expect(output).to eq(fixture_file_content('js/yarn.lock.expected'))
end
+
+ it 'executes `spandx scan composer.lock`' do
+ lockfile = fixture_file('composer/composer.lock')
+ output = `spandx scan #{lockfile} --format=json`
+
+ expect(JSON.parse(output)).to eq(JSON.parse(fixture_file_content('composer/composer.lock.expected')))
+ end
end