Skip to content

Commit

Permalink
Adapt specs to latest Webmock version
Browse files Browse the repository at this point in the history
  • Loading branch information
jacegu committed Apr 26, 2016
1 parent 05896a2 commit 171ce91
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/dnsimple/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
subject = described_class.new(username: "user", password: "pass")
subject.execute(:get, "test", {})

expect(WebMock).to have_requested(:get, "https://user:pass@api.dnsimple.com/test")
expect(WebMock).to have_requested(:get, "https://api.dnsimple.com/test").with(basic_auth: %w(user pass))
end

it "uses access token if there's an access token provided" do
Expand Down Expand Up @@ -116,8 +116,9 @@

subject.request(:get, 'foo', {})

expect(WebMock).to have_requested(:get, "https://user:pass@api.dnsimple.com/foo").
with(headers: { 'Accept' => 'application/json', 'User-Agent' => "dnsimple-ruby/#{Dnsimple::VERSION}" })
expect(WebMock).to have_requested(:get, "https://api.dnsimple.com/foo").
with(basic_auth: %w(user pass),
headers: { 'Accept' => 'application/json', 'User-Agent' => "dnsimple-ruby/#{Dnsimple::VERSION}" })
end

it "delegates to HTTParty" do
Expand Down

0 comments on commit 171ce91

Please sign in to comment.