spec/cfoundry/uaaclient_spec.rb in cfoundry-0.5.3.rc1 vs spec/cfoundry/uaaclient_spec.rb in cfoundry-0.5.3.rc2
- old
+ new
@@ -241,9 +241,33 @@
expect(req).to have_been_requested
end
end
end
+ describe "#delete_user" do
+ let(:guid) { "123" }
+ let!(:req) {
+ stub_request(
+ :delete,
+ "https://uaa.example.com/Users/123"
+ ).to_return(:status => 200, :body => '{ "foo": "bar" }')
+ }
+
+ subject { uaa }
+
+ it "wraps uaa errors" do
+ mock(uaa).wrap_uaa_errors
+ subject.delete_user(guid)
+ end
+
+ context 'with valid data' do
+ it "should add a user" do
+ subject.delete_user(guid)
+ expect(req).to have_been_requested
+ end
+ end
+ end
+
describe "#wrap_uaa_errors" do
subject { uaa.send(:wrap_uaa_errors) { raise error } }
context "when the block raises CF::UAA::BadResponse" do
let(:error) { CF::UAA::BadResponse }