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

Mitigates Style/AlgignParameters

This commit is contained in:
Thomas Nys 2015-04-18 13:39:48 +02:00
parent e00c9bce54
commit 9ed12bd761
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper'))
RSpec.describe Net::HTTPHeader::DigestAuthenticator do
def setup_digest(response)
digest = Net::HTTPHeader::DigestAuthenticator.new("Mufasa",
"Circle Of Life", "GET", "/dir/index.html", response)
"Circle Of Life", "GET", "/dir/index.html", response)
allow(digest).to receive(:random).and_return("deadbeef")
allow(Digest::MD5).to receive(:hexdigest) { |str| "md5(#{str})" }
digest

View file

@ -113,7 +113,7 @@ RSpec.describe HTTParty::Request do
it "should use digest auth when configured" do
FakeWeb.register_uri(:get, "http://api.foo.com/v1",
www_authenticate: 'Digest realm="Log Viewer", qop="auth", nonce="2CA0EC6B0E126C4800E56BA0C0003D3C", opaque="5ccc069c403ebaf9f0171e9517f40e41", stale=false')
www_authenticate: 'Digest realm="Log Viewer", qop="auth", nonce="2CA0EC6B0E126C4800E56BA0C0003D3C", opaque="5ccc069c403ebaf9f0171e9517f40e41", stale=false')
@request.options[:digest_auth] = {username: 'foobar', password: 'secret'}
@request.send(:setup_raw_request)