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

Commit ecf0b03

Browse files
FelisiaMpivotal-marcela-campo
authored andcommitted
Fixed formatting
1 parent e0d85bc commit ecf0b03

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

app/actions/service_credential_binding_key_create.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ def precursor(service_instance, name)
2323
private
2424

2525
def validate!(service_instance)
26-
2726
if service_instance.managed_instance?
2827
service_not_bindable! unless service_instance.service_plan.bindable?
2928
service_not_available! unless service_instance.service_plan.active?

app/controllers/v3/service_credential_bindings_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def create
5151
case message.type
5252
when 'app'
5353
app = VCAP::CloudController::AppModel.first(guid: message.app_guid)
54-
# TODO create two unprocessable_app/si methods
54+
# TODO: create two unprocessable_app/si methods
5555
resource_not_accessible!('app', message.app_guid) unless can_access_resource?(app)
5656

5757
unauthorized! unless can_write_to_space?(app.space)

app/models/services/service_key.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def space
3333
def validate
3434
validates_presence :name
3535
validates_presence :service_instance
36-
validates_unique [:name, :service_instance_id], message: Sequel.lit("The binding name is invalid. Key binding names must be unique. The service instance already has a key binding with name '#{name}'.")
36+
validates_unique [:name, :service_instance_id], message: Sequel.lit(
37+
"The binding name is invalid. Key binding names must be unique. The service instance already has a key binding with name '#{name}'.")
3738

3839
if service_instance
3940
MaxServiceKeysPolicy.new(

spec/request/service_credential_bindings_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,8 @@ def check_filtered_bindings(*bindings)
16021602

16031603
expect(last_response).to have_status_code(422)
16041604
expect(parsed_response['errors']).to include(include({
1605-
'detail' => include("The binding name is invalid. Key binding names must be unique. The service instance already has a key binding with name '#{service_cred_binding.name}'."),
1605+
'detail' => include(
1606+
"The binding name is invalid. Key binding names must be unique. The service instance already has a key binding with name '#{service_cred_binding.name}'."),
16061607
'title' => 'CF-UnprocessableEntity',
16071608
'code' => 10008,
16081609
}))

spec/unit/actions/service_credential_binding_key_create_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
module VCAP::CloudController
66
module V3
77
RSpec.describe ServiceCredentialBindingKeyCreate do
8-
subject(:action) { described_class.new() }
8+
subject(:action) { described_class.new }
99

1010
let(:space) { Space.make }
1111
let(:binding_details) {}
12-
let(:name) { 'test-key'}
12+
let(:name) { 'test-key' }
1313

1414
describe '#precursor' do
1515
RSpec.shared_examples 'the credential binding precursor' do
@@ -33,7 +33,7 @@ module V3
3333
end
3434

3535
context 'user-provided service instance' do
36-
let(:service_instance) { UserProvidedServiceInstance.make() }
36+
let(:service_instance) { UserProvidedServiceInstance.make }
3737

3838
it 'raises error' do
3939
expect { action.precursor(service_instance, name) }.to raise_error(

0 commit comments

Comments
 (0)