Sha256: 0ae2392562bf6aee9aec1f2f8561c77cde9e23baef4d6aa4c00e25dfc4787232
Contents?: true
Size: 1.46 KB
Versions: 8
Compression:
Stored size: 1.46 KB
Contents
require 'spec_helper' describe "The CVE-2012-1098 vulnerability" do before(:all) do @check = Dawn::Kb::CVE_2012_1098.new # @check.debug = true end it "fires when vulnerable rails version it has been found (3.0.11)" do @check.dependencies = [{:name=>"rails", :version=>'3.0.11'}] expect(@check.vuln?).to eq(true) end it "fires when vulnerable rails version it has been found (3.1.3)" do @check.dependencies = [{:name=>"rails", :version=>'3.1.3'}] expect(@check.vuln?).to eq(true) end it "fires when vulnerable rails version it has been found (3.2.1)" do @check.dependencies = [{:name=>"rails", :version=>'3.2.1'}] expect(@check.vuln?).to eq(true) end it "doesn't fire when non vulnerable rails version it has been found (3.2.2)" do @check.dependencies = [{:name=>"rails", :version=>'3.2.2'}] expect(@check.vuln?).to eq(false) end it "doesn't fire when non vulnerable rails version it has been found (3.2.4)" do @check.dependencies = [{:name=>"rails", :version=>'3.2.4'}] expect(@check.vuln?).to eq(false) end it "doesn't fire when non vulnerable rails version it has been found (3.1.4)" do @check.dependencies = [{:name=>"rails", :version=>'3.1.4'}] # @check.debug = true expect(@check.vuln?).to eq(false) end it "doesn't fire when rails version older than 3.x.y it has been found" do @check.dependencies = [{:name=>"rails", :version=>'2.3.12'}] expect(@check.vuln?).to eq(false) end end
Version data entries
8 entries across 8 versions & 1 rubygems