diff --git a/test/controllers/collections_controller_test.rb b/test/controllers/collections_controller_test.rb index f816332b8..9d3275078 100644 --- a/test/controllers/collections_controller_test.rb +++ b/test/controllers/collections_controller_test.rb @@ -55,9 +55,9 @@ class CollectionsControllerTest < ActionDispatch::IntegrationTest end test "destroy" do - assert_difference -> { Collection.count }, -1 do - delete collection_path(collections(:writebook)) - assert_redirected_to root_path - end + collection = collections(:writebook) + delete collection_path(collection) + assert_redirected_to root_path + assert_raises(ActiveRecord::RecordNotFound) { collection.reload } end end