BURs: remove ability to skip secondary validations.
Remove the ability to skip secondary validations when creating a BUR. The only skippable validation that still existed was the requirement that both tags in an implication must have wiki pages. It's now mandatory to write wiki pages for tags before you can request an implication. This doesn't apply to empty tags.
This commit is contained in:
@@ -48,26 +48,14 @@ class BulkUpdateRequestsControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
||||
|
||||
context "#update" do
|
||||
should "still handle enabled secondary validations correctly" do
|
||||
put_auth bulk_update_request_path(@bulk_update_request.id), @user, params: {bulk_update_request: {script: "create alias zzz -> 222", skip_secondary_validations: "0"}}
|
||||
assert_response :redirect
|
||||
assert_equal("create alias zzz -> 222", @bulk_update_request.reload.script)
|
||||
end
|
||||
|
||||
should "still handle disabled secondary validations correctly" do
|
||||
put_auth bulk_update_request_path(@bulk_update_request.id), @user, params: {bulk_update_request: {script: "create alias zzz -> 222", skip_secondary_validations: "1"}}
|
||||
assert_response :redirect
|
||||
assert_equal("create alias zzz -> 222", @bulk_update_request.reload.script)
|
||||
end
|
||||
|
||||
should "allow builders to update other people's requests" do
|
||||
put_auth bulk_update_request_path(@bulk_update_request.id), create(:builder_user), params: {bulk_update_request: {script: "create alias zzz -> 222", skip_secondary_validations: "0"}}
|
||||
put_auth bulk_update_request_path(@bulk_update_request.id), create(:builder_user), params: {bulk_update_request: {script: "create alias zzz -> 222" }}
|
||||
assert_response :redirect
|
||||
assert_equal("create alias zzz -> 222", @bulk_update_request.reload.script)
|
||||
end
|
||||
|
||||
should "not allow members to update other people's requests" do
|
||||
put_auth bulk_update_request_path(@bulk_update_request.id), create(:user), params: {bulk_update_request: {script: "create alias zzz -> 222", skip_secondary_validations: "0"}}
|
||||
put_auth bulk_update_request_path(@bulk_update_request.id), create(:user), params: {bulk_update_request: {script: "create alias zzz -> 222" }}
|
||||
assert_response 403
|
||||
assert_equal("create alias aaa -> bbb", @bulk_update_request.reload.script)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user