Sha256: ea59f242840d989cec857b1377f4bd4cc08e7e9a0625127a6508dcccee9100a8

Contents?: true

Size: 702 Bytes

Versions: 2

Compression:

Stored size: 702 Bytes

Contents

require "spec_helper"

module CFoundry
  module V2
    describe User do
      let(:client) { build(:client) }
      subject { build(:user, client: client) }

      describe '#delete!' do
        describe 'when cloud controller was able to delete the user' do
          before do
            stub_request(:delete, /v2\/users\/.*/).to_return(:status => 200, :body => "", :headers => {})
            client.base.stub(:info).and_return({:authorization_endpoint => 'some_endpoint'})
          end

          it "also removes the user from uaa" do
            CFoundry::UAAClient.any_instance.should_receive(:delete_user)

            subject.delete!({})
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cfoundry-2.3.1 spec/cfoundry/v2/user_spec.rb
cfoundry-2.3.0 spec/cfoundry/v2/user_spec.rb