From 9a3b855cf6c6b825e9df3478bfb12b423c449dfd Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 20 Mar 2020 16:04:25 -0500 Subject: [PATCH] bulk update requests: fix reference to title attribute. Also remove non-nullable and default options from migration. The column didn't originally have these options so they shouldn't be added if the migration is reverted. --- app/views/bulk_update_requests/show.html.erb | 2 +- .../20200318224633_drop_title_from_bulk_update_requests.rb | 2 +- test/functional/bulk_update_requests_controller_test.rb | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/bulk_update_requests/show.html.erb b/app/views/bulk_update_requests/show.html.erb index 0fcc617a8..f074030ab 100644 --- a/app/views/bulk_update_requests/show.html.erb +++ b/app/views/bulk_update_requests/show.html.erb @@ -1,6 +1,6 @@
-

Bulk Update Request: <%= @bulk_update_request.title %>

+

Bulk Update Request

    <% if @bulk_update_request.forum_topic_id %> diff --git a/db/migrate/20200318224633_drop_title_from_bulk_update_requests.rb b/db/migrate/20200318224633_drop_title_from_bulk_update_requests.rb index d75c17852..24957c268 100644 --- a/db/migrate/20200318224633_drop_title_from_bulk_update_requests.rb +++ b/db/migrate/20200318224633_drop_title_from_bulk_update_requests.rb @@ -1,5 +1,5 @@ class DropTitleFromBulkUpdateRequests < ActiveRecord::Migration[6.0] def change - remove_column :bulk_update_requests, :title, :text, null: false, default: "" + remove_column :bulk_update_requests, :title, :text end end diff --git a/test/functional/bulk_update_requests_controller_test.rb b/test/functional/bulk_update_requests_controller_test.rb index 57c2a255b..a6d377041 100644 --- a/test/functional/bulk_update_requests_controller_test.rb +++ b/test/functional/bulk_update_requests_controller_test.rb @@ -44,6 +44,13 @@ class BulkUpdateRequestsControllerTest < ActionDispatch::IntegrationTest end end + context "#show" do + should "render" do + get bulk_update_request_path(@bulk_update_request) + assert_response :success + end + end + context "#destroy" do context "for the creator" do should "succeed" do