Extract default stages into something that will be created together with a new Workflow in the model
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user