spec/cfoundry/uaaclient_spec.rb in cfoundry-0.4.16 vs spec/cfoundry/uaaclient_spec.rb in cfoundry-0.4.17

- old
+ new

@@ -1,6 +1,6 @@ -require 'spec_helper' +require "spec_helper" describe CFoundry::UAAClient do let(:target) { "https://uaa.example.com" } let(:uaa) { CFoundry::UAAClient.new(target) } @@ -112,18 +112,29 @@ subject { uaa.change_password(guid, new, old) } it 'sends a password change request' do req = stub_request( :put, - "#{target}/User/#{guid}/password" + "#{target}/Users/#{guid}/password" ).with( :body => { - :schemas => ["urn:scim:schemas:core:1.0"], :password => new, :oldPassword => old }, - :headers => { "Content-Type" => "application/json" } + :headers => { + "Content-Type" => "application/json", + "Accept" => "application/json" + } + ).to_return( + :status => 200, + :body => <<EOF + { + "status": "ok", + "message": "password_updated" + } +EOF ) + subject expect(req).to have_been_requested end