0
0
Fork 0

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
This commit is contained in:
Matt Jankowski 2017-04-29 18:25:38 -04:00 committed by Eugen Rochko
parent 8325866c61
commit f48cb3eb17
6 changed files with 108 additions and 7 deletions

View file

@ -27,7 +27,7 @@ module Admin
def destroy
@domain_block = DomainBlock.find(params[:id])
UnblockDomainService.new.call(@domain_block, resource_params[:retroactive])
UnblockDomainService.new.call(@domain_block, retroactive_unblock?)
redirect_to admin_domain_blocks_path, notice: I18n.t('admin.domain_blocks.destroyed_msg')
end
@ -36,5 +36,9 @@ module Admin
def resource_params
params.require(:domain_block).permit(:domain, :severity, :reject_media, :retroactive)
end
def retroactive_unblock?
resource_params[:retroactive] == '1'
end
end
end