From 1c3a482304d0df5382fbdac8fbdd7bb374c6ad0e Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Tue, 24 Jan 2017 04:10:40 +0200 Subject: [PATCH] Add polls stub for testing in registrar area #248 --- app/controllers/registrar/polls_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/registrar/polls_controller.rb b/app/controllers/registrar/polls_controller.rb index e29f02f67..5f893e3c3 100644 --- a/app/controllers/registrar/polls_controller.rb +++ b/app/controllers/registrar/polls_controller.rb @@ -3,7 +3,12 @@ class Registrar::PollsController < Registrar::DeppController # EPP controller before_action :init_epp_xml def show - @data = depp_current_user.request(@ex.poll) + if Rails.env.test? # Stub for depp server request + @data = Object.new + def @data.css(key); []; end + else + @data = depp_current_user.request(@ex.poll) + end end def destroy