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

Commit 89d665b

Browse files
author
Derik Evangelista
committed
v3(test): add test for invalid route schema
[finishes #173416344](https://www.pivotaltracker.com/story/show/173416344)
1 parent 33c669c commit 89d665b

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

spec/request/service_instances_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,21 @@ def check_filtered_instances(*instances)
861861
expect(last_response).to have_status_code(201)
862862
end
863863
end
864+
865+
context 'when the route is not https' do
866+
it 'returns an error' do
867+
request_body[:route_service_url] = 'http://banana.example.com'
868+
api_call.call(space_dev_headers)
869+
expect(last_response).to have_status_code(422)
870+
expect(parsed_response['errors']).to include(
871+
include({
872+
'detail' => 'Route service url must be https',
873+
'title' => 'CF-UnprocessableEntity',
874+
'code' => 10008,
875+
})
876+
)
877+
end
878+
end
864879
end
865880

866881
context 'managed service instance' do

0 commit comments

Comments
 (0)