From f48cb3eb170314cba1938522c0da44af21d47e83 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Sat, 29 Apr 2017 18:25:38 -0400 Subject: More coverage yes more even more (#2627) * Add coverage for admin/confirmations controller * Coverage for statuses controller show action * Add coverage for admin/domain_blocks controller * Add coverage for settings/profiles#update --- app/controllers/admin/confirmations_controller.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'app/controllers/admin/confirmations_controller.rb') diff --git a/app/controllers/admin/confirmations_controller.rb b/app/controllers/admin/confirmations_controller.rb index 6c41999e0..2542e21ee 100644 --- a/app/controllers/admin/confirmations_controller.rb +++ b/app/controllers/admin/confirmations_controller.rb @@ -2,17 +2,15 @@ module Admin class ConfirmationsController < BaseController - before_action :set_account - def create - @account.user.confirm + account_user.confirm redirect_to admin_accounts_path end private - def set_account - @account = Account.find(params[:account_id]) + def account_user + Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound) end end end -- cgit