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.
This commit is contained in:
evazion
2020-03-20 16:04:25 -05:00
parent 09f021daf7
commit 9a3b855cf6
3 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
<div id="c-bulk-update-requests">
<div id="a-show">
<h1>Bulk Update Request: <%= @bulk_update_request.title %></h1>
<h1>Bulk Update Request</h1>
<ul>
<% if @bulk_update_request.forum_topic_id %>

View File

@@ -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

View File

@@ -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