Skip to content

Commit

Permalink
style(workflow_test) use generic error instead of ArgumentError
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMarcusMillne committed Aug 21, 2023
1 parent 2e98cc7 commit b331c9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/models/workflow_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ def template_user_and_published_transaction

should "not be in published state if the transition fails" do
edition = FactoryBot.create(:edition, state: "ready")
raise_exception = -> { raise ArgumentError.new }
raise_exception = -> { raise "something went wrong with the publish transition" }
edition.stub :was_published, raise_exception do
assert_raises(ArgumentError) { publish(@user, edition, "this should fail") }
end
Expand Down

0 comments on commit b331c9d

Please sign in to comment.