/
approve_dependencies.feature
59 lines (54 loc) · 2.08 KB
/
approve_dependencies.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Feature: Approving non-whitelisted Dependencies
So that I can track the dependencies of my application which my business has approved
As an application developer using license finder
I want to be able to manually approve dependencies that have licenses which fall outside of my whitelist
Scenario: Approving a non-whitelisted dependency via the `license_finder` command
Given I have an app with license finder
And my app depends on a gem "gpl_gem" licensed with "GPL"
When I run "license_finder"
Then I should see "gpl_gem" in its output
When I run "license_finder -a gpl_gem"
When I run "license_finder"
Then I should not see "gpl_gem" in its output
Then I should see the "gpl_gem" in the html flagged as "approved"
Scenario: Manually approving a non-whitelisted dependency
Given I have an app with license finder
And my app depends on a gem "gpl_gem" licensed with "GPL"
And I whitelist the "MIT" license
When I run "license_finder"
Then I should see the following settings for "gpl_gem":
"""
version: "0.0.0"
license: "GPL"
approved: false
"""
When I update the settings for "gpl_gem" with the following content:
"""
approved: true
"""
When I run "license_finder"
Then I should not see "gpl_gem" in its output
Scenario: Manually adding a non-bundled dependency
Given I have an app with license finder
When I run "license_finder"
And I add the following content to "dependencies.yml":
"""
- name: "my_javascript_library"
version: "0.0.0"
license: "GPL"
approved: false
"""
Then I should see the following settings for "my_javascript_library":
"""
version: "0.0.0"
license: "GPL"
approved: false
"""
When I run "license_finder"
Then I should see "my_javascript_library" in its output
When I update the settings for "my_javascript_library" with the following content:
"""
approved: true
"""
When I run "license_finder"
Then I should not see "my_javascript_library" in its output