b7c2369988
The previous implementation would delete all accesses if the bucket was not all_access. I think it's simpler to move the bucket workflow into a separate Buckets::WorkflowsController, rather than deal with different sets of params from different forms in the existing BucketsController.
17 lines
425 B
Ruby
17 lines
425 B
Ruby
require "test_helper"
|
|
|
|
class Buckets::WorkflowsControllerTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
sign_in_as :kevin
|
|
end
|
|
|
|
test "update" do
|
|
bucket = buckets(:writebook)
|
|
|
|
patch bucket_workflow_url(bucket), params: { bucket: { workflow_id: workflows(:on_call).id } }
|
|
|
|
assert_redirected_to bubbles_path(bucket_ids: [ bucket.id ])
|
|
assert_equal workflows(:on_call), bucket.reload.workflow
|
|
end
|
|
end
|