1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Assertion is enough to test that error doesn't happen

If the code to prevent this is removed then an exception will be raised
which will fail the test.
This commit is contained in:
John Nunemaker 2015-12-01 15:32:27 -05:00
parent 039cd23b8a
commit 61ade85eae

View file

@ -154,17 +154,11 @@ RSpec.describe Net::HTTPHeader::DigestAuthenticator do
context "with http basic auth response when net digest auth expected" do
it "should not fail" do
# fails already so it is defined here
begin
@digest = setup_digest({
'www-authenticate' => 'WWW-Authenticate: Basic realm="testrealm.com""'
})
expect(authorization_header).to include("Digest")
rescue => e
fail "Should not fail on different authentification method"
end
@digest = setup_digest({
'www-authenticate' => 'WWW-Authenticate: Basic realm="testrealm.com""'
})
expect(authorization_header).to include("Digest")
end
end