Skip to content

Commit 2826e2c

Browse files
committed
Fix route_policies_spec: use 'Source' terminology and 'sources' query param
- Line 206: expect error message to include 'Source' (not 'Selector') - Line 292: use query param ?sources= (not ?selectors=) - Line 344: use query param ?sources= in combined filter test These complete the terminology rebrand from 'selector' to 'source' in the route policies context per RFC be8d74c1.
1 parent a41e9b0 commit 2826e2c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

spec/request/route_policies_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def expected_rule_json(rule)
203203
}.to_json, admin_header
204204

205205
expect(last_response.status).to eq(422)
206-
expect(last_response.body).to include('Selector')
206+
expect(last_response.body).to include('Source')
207207
end
208208
end
209209

@@ -289,7 +289,7 @@ def expected_rule_json(rule)
289289
end
290290

291291
it 'filters by selectors' do
292-
get '/v3/route_policies?selectors=cf:any', nil, admin_header
292+
get '/v3/route_policies?sources=cf:any', nil, admin_header
293293

294294
expect(last_response.status).to eq(200)
295295
parsed = Oj.load(last_response.body)
@@ -341,7 +341,7 @@ def expected_rule_json(rule)
341341
end
342342

343343
it 'combines space_guids with other filters' do
344-
get "/v3/route_policies?space_guids=#{space.guid}&selectors=cf:app:#{valid_uuid}", nil, admin_header
344+
get "/v3/route_policies?space_guids=#{space.guid}&sources=cf:app:#{valid_uuid}", nil, admin_header
345345

346346
expect(last_response.status).to eq(200)
347347
parsed = Oj.load(last_response.body)

0 commit comments

Comments
 (0)