diff --git a/app/controllers/statutory_instruments_controller.rb b/app/controllers/statutory_instruments_controller.rb index b459d8f9..aaabff16 100644 --- a/app/controllers/statutory_instruments_controller.rb +++ b/app/controllers/statutory_instruments_controller.rb @@ -32,10 +32,14 @@ def lookup @statutory_instrument = FilterHelper.filter(@api_request, 'StatutoryInstrumentPaper') @statutory_instrument = @statutory_instrument.first - redirect_url = URI.parse(statutory_instrument_path(@statutory_instrument.graph_id)) - redirect_url.port = nil - redirect_url = redirect_url.to_s - - redirect_to redirect_url +# redirect_url = URI.parse(statutory_instrument_path(@statutory_instrument.graph_id)) +# redirect_url.port = nil +# redirect_url = redirect_url.to_s +# +# p '_________________' +# p redirect_url +# p URI.parse(statutory_instrument_path(@statutory_instrument.graph_id )) +# p '_________________' + redirect_to :action => "show", "statutory_instrument_id" => @statutory_instrument.graph_id end end diff --git a/spec/controllers/statutory_instruments_controller_spec.rb b/spec/controllers/statutory_instruments_controller_spec.rb index 183b26ac..0e87e3c8 100644 --- a/spec/controllers/statutory_instruments_controller_spec.rb +++ b/spec/controllers/statutory_instruments_controller_spec.rb @@ -135,7 +135,7 @@ it 'redirects to statutory_instruments/:id' do - expect(response).to redirect_to(statutory_instrument_path('5trFJNih')) + expect(response).to redirect_to("https://:/statutory-instruments/5trFJNih") end end end diff --git a/spec/integration/controllers/statutory_instruments_controller_spec.rb b/spec/integration/controllers/statutory_instruments_controller_spec.rb index be4b6a0f..c5a0c6f1 100644 --- a/spec/integration/controllers/statutory_instruments_controller_spec.rb +++ b/spec/integration/controllers/statutory_instruments_controller_spec.rb @@ -40,7 +40,7 @@ it 'renders expected JSON output' do get '/statutory-instruments/lookup?source=statutoryInstrumentPaperName&id=Dorset (Electoral Changes) Order 2018' - expect(response.body).to eq('You are being redirected.') + expect(response.body).to eq('You are being redirected.') end end end