Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit fd8d71c

Browse files
JenGoldstrichctlong
andcommitted
Fix org creation unit tests
[#175042021] Co-authored-by: Jenna Goldstrich <jgoldstrich@pivotal.io> Co-authored-by: Carson Long <lcarson@vmware.com>
1 parent 25d291b commit fd8d71c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

spec/unit/controllers/v3/organizations_controller_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,13 @@
8484

8585
describe '#create' do
8686
let(:user) { VCAP::CloudController::User.make }
87-
87+
let(:uaa_client) { instance_double(VCAP::CloudController::UaaClient) }
8888
before do
8989
set_current_user(user)
90+
allow(CloudController::DependencyLocator.instance).to receive(:uaa_client).and_return(uaa_client)
91+
allow(uaa_client).to receive(:usernames_for_ids).with([user.guid]).and_return(
92+
{ user.guid => 'Ragnaros' }
93+
)
9094
end
9195

9296
describe 'permissions by role' do

0 commit comments

Comments
 (0)