Correct rspect to the correct behavior

unstable
sinn3r 2013-01-30 16:13:17 -06:00
parent 95cc84f5e8
commit d8b15daaf2
1 changed files with 8 additions and 8 deletions

View File

@ -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