Correct rspect to the correct behavior
parent
95cc84f5e8
commit
d8b15daaf2
|
@ -56,8 +56,8 @@ describe Msf::Exploit::Remote::HttpClient do
|
|||
unnormalized_uri[-1, 1].should == '/'
|
||||
end
|
||||
|
||||
it "should remove the trailing '/'" do
|
||||
normalized_uri.should == expected_normalized_uri
|
||||
it "should end with '/'" do
|
||||
normalized_uri[-1, 1].should == '/'
|
||||
end
|
||||
|
||||
context "with just '/'" do
|
||||
|
@ -76,11 +76,11 @@ describe Msf::Exploit::Remote::HttpClient do
|
|||
|
||||
context "with multiple multiple trailing '/'" do
|
||||
let(:unnormalized_uri) do
|
||||
"#{expected_normalized_uri}//"
|
||||
"#{expected_normalized_uri}"
|
||||
end
|
||||
|
||||
it "should have multiple trailing '/'" do
|
||||
unnormalized_uri[-2 .. -1].should == '//'
|
||||
it "should have single trailing '/'" do
|
||||
unnormalized_uri[-2,1].should == '/'
|
||||
end
|
||||
|
||||
it "should return only one trailing '/'" do
|
||||
|
@ -122,12 +122,12 @@ describe Msf::Exploit::Remote::HttpClient do
|
|||
normalized_uri[0, 1].should == '/'
|
||||
end
|
||||
|
||||
it "'should remove trailing '/'" do
|
||||
normalized_uri[-1, 1].should_not == '/'
|
||||
it "'should not remove trailing '/'" do
|
||||
normalized_uri[-1, 1].should == '/'
|
||||
end
|
||||
|
||||
it 'should normalize the uri' do
|
||||
normalized_uri.should == expected_normalized_uri
|
||||
normalized_uri.should == "#{expected_normalized_uri}/"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue