From 89ebe757be4bbfa6e6d4cbfe167aacc9b21b6940 Mon Sep 17 00:00:00 2001 From: "Butler, Alexis (UG - Computer Science)" <ab02259@surrey.ac.uk> Date: Sun, 29 Nov 2020 14:52:58 +0000 Subject: [PATCH] Passed admin section cont tests --- app/views/admin/sections/_section.html.erb | 2 +- test/controllers/admin/sections_controller_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/admin/sections/_section.html.erb b/app/views/admin/sections/_section.html.erb index 3b3264d..9cfb888 100644 --- a/app/views/admin/sections/_section.html.erb +++ b/app/views/admin/sections/_section.html.erb @@ -4,6 +4,6 @@ <h4><%= section.name %></h4> </td> <td> - <%= link_to fa_icon('trash'), [:admin, section], method: :delete, data: { confirm: t('.confirm') } %> + <%= link_to fa_icon('trash'), [:admin, section], class: 'btn btn-sm btn-danger', method: :delete, data: { confirm: t('.confirm') } %> </td> </tr> \ No newline at end of file diff --git a/test/controllers/admin/sections_controller_test.rb b/test/controllers/admin/sections_controller_test.rb index e172199..00ca204 100644 --- a/test/controllers/admin/sections_controller_test.rb +++ b/test/controllers/admin/sections_controller_test.rb @@ -57,7 +57,7 @@ class Admin::SectionsControllerTest < ActionDispatch::IntegrationTest assert_redirected_to(admin_sections_url) assert_equal 'Section deleted', flash[:success] end - test 'should not delete a product if not admin' do + test 'should not delete a section if not admin' do sign_in_as_tester assert_no_difference 'Section.count' do delete admin_section_url(sections(:one)) -- GitLab