Fix #4441: BUR form: display original request in the error page.

This commit is contained in:
evazion
2020-05-04 03:18:16 -05:00
parent 12d83408ab
commit 5feb29ba57
3 changed files with 11 additions and 9 deletions

View File

@@ -30,6 +30,13 @@ class BulkUpdateRequestsControllerTest < ActionDispatch::IntegrationTest
end
end
should "fail for an invalid script" do
assert_difference("BulkUpdateRequest.count", 0) do
post_auth bulk_update_requests_path, @user, params: { bulk_update_request: attributes_for(:bulk_update_request).merge(script: "create alis gray -> grey") }
assert_response :success
end
end
should "fail for a blank reason" do
assert_difference("BulkUpdateRequest.count", 0) do
post_auth bulk_update_requests_path, @user, params: { bulk_update_request: attributes_for(:bulk_update_request).merge(reason: "") }