BURs: make the reason required.

This commit is contained in:
evazion
2020-05-04 03:07:30 -05:00
parent 08fe1c453c
commit 12d83408ab
3 changed files with 10 additions and 1 deletions

View File

@@ -25,10 +25,17 @@ class BulkUpdateRequestsControllerTest < ActionDispatch::IntegrationTest
context "#create" do
should "succeed" do
assert_difference("BulkUpdateRequest.count", 1) do
post_auth bulk_update_requests_path, @user, params: {bulk_update_request: {skip_secondary_validations: "1", script: "create alias aaa -> bbb", title: "xxx"}}
post_auth bulk_update_requests_path, @user, params: { bulk_update_request: attributes_for(:bulk_update_request) }
assert_response :redirect
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: "") }
assert_response :success
end
end
end
context "#update" do