Skip to content

Commit

Permalink
test invalid state type
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrock committed May 23, 2024
1 parent ef7d04e commit 6cc0282
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/workflow_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
expect { described_class.new(payload) }.to raise_error(Floe::InvalidWorkflowError, "Missing field \"States\"")
end

it "raises an exception for invalid States" do
expect { make_workflow(ctx, {"FirstState" => {"Type" => "Invalid"}}) }.to raise_error(Floe::InvalidWorkflowError, "Invalid state type: [Invalid]")
end

it "raises an exception for missing StartAt" do
payload = {"Comment" => "Test", "States" => {}}

Expand Down

0 comments on commit 6cc0282

Please sign in to comment.