@@ -5,6 +5,7 @@ module VCAP::CloudController::Presenters::V3
55 RSpec . describe RoutePresenter do
66 let! ( :app ) { VCAP ::CloudController ::AppModel . make }
77 let ( :space ) { VCAP ::CloudController ::Space . make }
8+ let ( :options ) { { lb_algo : 'round-robin' } }
89 let ( :org ) { space . organization }
910 let ( :route_host ) { 'host' }
1011 let ( :path ) { '/path' }
@@ -20,7 +21,8 @@ module VCAP::CloudController::Presenters::V3
2021 host : route_host ,
2122 path : path ,
2223 space : space ,
23- domain : domain
24+ domain : domain ,
25+ options : options
2426 )
2527 end
2628
@@ -70,6 +72,7 @@ module VCAP::CloudController::Presenters::V3
7072 expect ( subject [ :updated_at ] ) . to be_a ( Time )
7173 expect ( subject [ :host ] ) . to eq ( route_host )
7274 expect ( subject [ :path ] ) . to eq ( path )
75+ expect ( subject [ :options ] ) . to eq ( 'lb_algo' => 'round-robin' )
7376 expect ( subject [ :url ] ) . to eq ( "#{ route . host } .#{ domain . name } #{ route . path } " )
7477
7578 expected_destinations = [
@@ -125,6 +128,21 @@ module VCAP::CloudController::Presenters::V3
125128 end
126129 end
127130
131+ context 'when options is empty' do
132+ let ( :route ) do
133+ VCAP ::CloudController ::Route . make (
134+ host : 'foobar' ,
135+ path : path ,
136+ space : space ,
137+ domain : domain ,
138+ )
139+ end
140+
141+ it 'does not output options' do
142+ expect ( subject [ :options ] ) . to be_nil
143+ end
144+ end
145+
128146 context 'when there are decorators' do
129147 let ( :banana_decorator ) do
130148 Class . new do
0 commit comments