Skip to content

Commit

Permalink
Run fixes for rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-s-ccs committed Oct 4, 2023
1 parent ef974e8 commit cc2f7fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions spec/services/cognito/confirm_password_reset_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@
allow(Aws::CognitoIdentityProvider::Client).to receive(:new).with(region: 'supersecretregion').and_return(client)
allow(client).to receive(:admin_get_user).and_return(cognito_user)
allow(cognito_user).to receive(:user_attributes).and_return([attribute_type])
allow(attribute_type).to receive(:name).and_return('sub')
allow(attribute_type).to receive(:value).and_return('my-cognito-id')
allow(attribute_type).to receive_messages(name: 'sub', value: 'my-cognito-id')
allow(client).to receive(:admin_list_groups_for_user)
end

Expand Down
6 changes: 2 additions & 4 deletions spec/services/cognito/create_user_from_cognito_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
before do
allow(client).to receive(:admin_get_user).and_return(cognito_user)
allow(cognito_user).to receive(:user_attributes).and_return([attribute_type])
allow(attribute_type).to receive(:name).and_return('sub')
allow(attribute_type).to receive(:value).and_return('my-cognito-id')
allow(attribute_type).to receive_messages(name: 'sub', value: 'my-cognito-id')
allow(client).to receive(:admin_list_groups_for_user)
create_user_from_cognito.call
end
Expand Down Expand Up @@ -94,8 +93,7 @@

before do
create_user_from_cognito.instance_variable_set(:@cognito_user, cognito_user)
allow(attribute_type).to receive(:name).and_return('sub')
allow(attribute_type).to receive(:value).and_return('my-cognito-id')
allow(attribute_type).to receive_messages(name: 'sub', value: 'my-cognito-id')
end

context 'when the user has been found' do
Expand Down
3 changes: 1 addition & 2 deletions spec/services/cognito/sign_in_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@
let(:explicit_auth_flows) { ['USER_PASSWORD_AUTH'] }

before do
allow(user_pool_client).to receive(:client_id).and_return('supersecretkey2')
allow(user_pool_client).to receive(:client_secret).and_return('supersecretkey1')
allow(user_pool_client).to receive_messages(client_id: 'supersecretkey2', client_secret: 'supersecretkey1')
allow(client).to receive(:initiate_auth).and_return(auth_response)
sign_in_user.call
end
Expand Down

0 comments on commit cc2f7fa

Please sign in to comment.