Extract default stages into something that will be created together with a new Workflow in the model

This commit is contained in:
David Heinemeier Hansson
2025-04-18 16:07:01 +02:00
parent fd21838f88
commit f6cd21f7cb
4 changed files with 37 additions and 2 deletions
@@ -0,0 +1,19 @@
require "test_helper"
class WorkflowsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in_as :kevin
end
test "index" do
get workflows_path
assert_in_body workflows(:on_call).name
end
test "create" do
assert_difference -> { Workflow.count }, +1 do
post workflows_path, params: { workflow: { name: "My new workflow!" } }
assert_redirected_to workflows_path
end
end
end