Vulnerability::Output specs
This commit is contained in:
28
spec/lib/common/models/vulnerability/output_spec.rb
Normal file
28
spec/lib/common/models/vulnerability/output_spec.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Vulnerability::Output do
|
||||
let(:modules_url) { 'http://www.metasploit.com/modules/' }
|
||||
|
||||
describe '::metasploit_module_url' do
|
||||
after :each do
|
||||
Vulnerability::Output.metasploit_module_url(@module).should == @expected
|
||||
end
|
||||
|
||||
it 'removes the leading slash' do
|
||||
@module = '/exploit/testing'
|
||||
@expected = modules_url + 'exploit/testing'
|
||||
end
|
||||
|
||||
it 'returns the correct url' do
|
||||
@module = 'gathering/yolo'
|
||||
@expected = modules_url + @module
|
||||
end
|
||||
end
|
||||
|
||||
describe '#output' do
|
||||
# How to test it ? oO
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user