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:
parent
039cd23b8a
commit
61ade85eae
1 changed files with 4 additions and 10 deletions
|
@ -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
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue