File tree 1 file changed +31
-0
lines changed
spec/cc/engine/bundler_audit
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ require "spec_helper"
2
+
3
+ module CC ::Engine ::BundlerAudit
4
+ describe Remediation do
5
+ describe "#points" do
6
+ it "returns major upgrade remediation points when an upgrade requies a major version bump" do
7
+ remediation = Remediation . new ( "1.0.0" , %w[ 2.0.1 3.0.1 ] )
8
+
9
+ expect ( remediation . points ) . to eq ( Remediation ::MAJOR_UPGRADE_POINTS )
10
+ end
11
+
12
+ it "returns minor upgrade remediation points when an upgrade requies a minor version bump" do
13
+ remediation = Remediation . new ( "1.0.0" , %w[ 1.2.1 2.2.1 ] )
14
+
15
+ expect ( remediation . points ) . to eq ( Remediation ::MINOR_UPGRADE_POINTS )
16
+ end
17
+
18
+ it "returns patch upgrade remediation points when an upgrade requies a patch version bump" do
19
+ remediation = Remediation . new ( "1.0.0" , %w[ 1.0.3 2.0.3 ] )
20
+
21
+ expect ( remediation . points ) . to eq ( Remediation ::PATCH_UPGRADE_POINTS )
22
+ end
23
+
24
+ it "returns unpatched version remediation points when an upgrade is not possible" do
25
+ remediation = Remediation . new ( "1.0.0" , [ ] )
26
+
27
+ expect ( remediation . points ) . to eq ( Remediation ::UNPATCHED_VERSION_POINTS )
28
+ end
29
+ end
30
+ end
31
+ end
You can’t perform that action at this time.
0 commit comments