Pre-transpec

This commit is contained in:
erwanlr
2014-06-02 22:02:44 +02:00
parent 5caf4f45a9
commit c12b1d0670
3 changed files with 31 additions and 28 deletions

View File

@@ -13,18 +13,19 @@ describe Vulnerability do
context 'w/o metasploit and fixed version modules argument' do
subject(:vulnerability) { Vulnerability.new(title, type, references) }
its(:title) { should be title }
its(:references) { should be references }
its(:type) { should be type }
its(:fixed_in) { should be_empty }
its(:title) { should be title }
its(:references) { should be references }
its(:type) { should be type }
its(:fixed_in) { should be_empty }
end
context 'with fixed version argument' do
let(:fixed_version) { '1.0' }
its(:title) { should be title }
its(:references) { should be references }
its(:type) { should be type }
its(:fixed_in) { should be fixed_version }
let(:fixed_version) { '1.0' }
its(:title) { should be title }
its(:references) { should be references }
its(:type) { should be type }
its(:fixed_in) { should be fixed_version }
end
end
@@ -36,18 +37,18 @@ describe Vulnerability do
}
expected_refs = {
:url=>['Ref 1', 'Ref 2'],
:cve=>['2011-001'],
:secunia=>['secunia'],
:osvdb=>['osvdb'],
:metasploit=>['exploit/ex1'],
:exploitdb=>['exploitdb']
:url => ['Ref 1', 'Ref 2'],
:cve => ['2011-001'],
:secunia => ['secunia'],
:osvdb => ['osvdb'],
:metasploit => ['exploit/ex1'],
:exploitdb => ['exploitdb']
}
its(:title) { should == 'Vuln Title' }
its(:type) { should == 'CSRF' }
its(:references) { should == expected_refs}
its(:fixed_in) { should == '1.0'}
its(:title) { should == 'Vuln Title' }
its(:type) { should == 'CSRF' }
its(:references) { should == expected_refs}
its(:fixed_in) { should == '1.0'}
end
end