Skip to content

Commit 9589e16

Browse files
committed
Fix rubocop spec issues
1 parent e293c12 commit 9589e16

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

spec/unit/actions/manifest_route_update_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ module VCAP::CloudController
512512
it 'updates the existing route with the new loadbalancing option' do
513513
expect do
514514
ManifestRouteUpdate.update(app.guid, message, user_audit_info)
515-
end.not_to(change { Route.count })
515+
end.not_to(change(Route, :count))
516516

517517
route.reload
518518
expect(route.options).to include({ 'loadbalancing' => 'least-connection' })

spec/unit/actions/route_update_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ module VCAP::CloudController
374374
end
375375
end
376376

377-
378377
context 'when the route has existing option loadbalancing=round-robin' do
379378
before do
380379
route[:options] = '{"loadbalancing": "round-robin"}'

spec/unit/messages/manifest_routes_update_message_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,8 @@ module VCAP::CloudController
339339

340340
expect(msg.valid?).to be(false)
341341
expect(msg.errors.full_messages).to include(
342-
"Cannot use loadbalancing value 'hash' for Route 'existing.example.com'; Valid values are: 'round-robin, least-connection'")
342+
"Cannot use loadbalancing value 'hash' for Route 'existing.example.com'; Valid values are: 'round-robin, least-connection'"
343+
)
343344
end
344345
end
345346

@@ -359,7 +360,8 @@ module VCAP::CloudController
359360

360361
expect(msg.valid?).to be(false)
361362
expect(msg.errors.full_messages).to include(
362-
"Route 'existing.example.com' contains invalid route option 'hash_header'. Valid keys: 'loadbalancing'")
363+
"Route 'existing.example.com' contains invalid route option 'hash_header'. Valid keys: 'loadbalancing'"
364+
)
363365
end
364366
end
365367

@@ -707,7 +709,6 @@ module VCAP::CloudController
707709
end
708710
end
709711

710-
711712
context 'when a route contains numeric string hash_balance' do
712713
let(:body) do
713714
{ 'routes' =>

spec/unit/models/runtime/route_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -899,15 +899,15 @@ module VCAP::CloudController
899899

900900
let(:http_route) do
901901
Route.new(space: space,
902-
domain: http_domain,
903-
host: 'bar')
902+
domain: http_domain,
903+
host: 'bar')
904904
end
905905

906906
subject(:tcp_route) do
907907
Route.new(space: space,
908-
domain: tcp_domain,
909-
host: '',
910-
port: 6000)
908+
domain: tcp_domain,
909+
host: '',
910+
port: 6000)
911911
end
912912
before do
913913
router_group = double('router_group', type: 'tcp', reservable_ports: [4444, 6000])
@@ -1238,10 +1238,10 @@ module VCAP::CloudController
12381238
context 'with complete options hash' do
12391239
it 'normalizes hash_balance while preserving other options' do
12401240
result = route.send(:normalize_hash_balance_to_string, {
1241-
loadbalancing: 'hash',
1242-
hash_header: 'X-User-ID',
1243-
hash_balance: 3.14159
1244-
})
1241+
loadbalancing: 'hash',
1242+
hash_header: 'X-User-ID',
1243+
hash_balance: 3.14159
1244+
})
12451245
expect(result[:loadbalancing]).to eq('hash')
12461246
expect(result[:hash_header]).to eq('X-User-ID')
12471247
expect(result[:hash_balance]).to eq('3.14159')

0 commit comments

Comments
 (0)