diff --git a/app/controllers/registrar/polls_controller.rb b/app/controllers/registrar/polls_controller.rb index 37f5700f2..db0a83258 100644 --- a/app/controllers/registrar/polls_controller.rb +++ b/app/controllers/registrar/polls_controller.rb @@ -2,8 +2,8 @@ class Registrar::PollsController < Registrar::DeppController # EPP controller before_action :init_epp_xml def show - authorize! :view, :registrar_dashboard - @data = depp_current_user.request(@ex.poll) + authorize! :view, :registrar_dashboard + @data = depp_current_user.request(@ex.poll) end def destroy diff --git a/app/controllers/registrar/sessions_controller.rb b/app/controllers/registrar/sessions_controller.rb index 65ed23c4f..8cecee053 100644 --- a/app/controllers/registrar/sessions_controller.rb +++ b/app/controllers/registrar/sessions_controller.rb @@ -1,5 +1,9 @@ class Registrar::SessionsController < ::SessionsController layout 'registrar/application' + helper_method :depp_controller? + def depp_controller? + false + end def create @user = ApiUser.first if params[:user1] diff --git a/app/helpers/registrar/application_helper.rb b/app/helpers/registrar/application_helper.rb index 83985b703..920260c4b 100644 --- a/app/helpers/registrar/application_helper.rb +++ b/app/helpers/registrar/application_helper.rb @@ -1,15 +1,13 @@ -module Registrar - module ApplicationHelper - def env_style - return '' if unstable_env.nil? - "background-image: url(#{image_path("registrar/bg-#{unstable_env}.png")});" - end +module Registrar::ApplicationHelper + def env_style + return '' if unstable_env.nil? + "background-image: url(#{image_path("registrar/bg-#{unstable_env}.png")});" + end - def pagination_details - params[:page] ||= 1 - limit = ENV['depp_records_on_page'] || 20 - offset = ((params[:page].to_i - 1) * limit.to_i) - [limit, offset] - end + def pagination_details + params[:page] ||= 1 + limit = ENV['depp_records_on_page'] || 20 + offset = ((params[:page].to_i - 1) * limit.to_i) + [limit, offset] end end diff --git a/spec/features/registrar/root_spec.rb b/spec/features/registrar/root_spec.rb index 2a33d57f6..0d6b751fb 100644 --- a/spec/features/registrar/root_spec.rb +++ b/spec/features/registrar/root_spec.rb @@ -6,17 +6,17 @@ feature 'Root', type: :feature do Fabricate(:api_user) end - fit 'should redirect to registrar login page' do + it 'should redirect to registrar login page' do visit '/registrar/login' current_path.should == '/registrar/login' end - fit 'should redirect to registrar login page' do + it 'should redirect to registrar login page' do visit '/registrar' current_path.should == '/registrar/login' end - fit 'should redirect to registrar login page' do + it 'should redirect to registrar login page' do visit '/registrar/' current_path.should == '/registrar/login' end