spec/user_spec.rb in tijuana_client-0.2.2 vs spec/user_spec.rb in tijuana_client-0.2.3
- old
+ new
@@ -72,11 +72,11 @@
let(:body) { "" }
let(:request_body) { {'data' => JSON.generate({ first_name: 'Nathan'})} }
let(:request_path) { '/api/users/' }
before(:each) do
- stub_request(:post, "https://username:password@test.com#{request_path}").with(body: request_body).to_return(:body => body, :status => status,
- :headers => { content_type: "application/json; charset=utf-8"})
+ stub_request(:post, "https://test.com#{request_path}").with(basic_auth: ['username', 'password'], body: request_body)
+ .to_return(:body => body, :status => status, :headers => { content_type: "application/json; charset=utf-8"})
end
describe "success" do
let(:status) { 200 }