Files
fizzy/test/controllers/buckets/workflows_controller_test.rb
T
Mike Dalessio b7c2369988 Fix setting the workflow on a collection
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.
2025-03-30 09:24:56 -04:00

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