Skip to content

Commit

Permalink
[#57816] added contract test with localized error validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharonus committed Oct 11, 2024
1 parent 7dd368b commit 7928794
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@
expect(result).to be_failure
expect(result.errors.to_h).to include(label: ["must be unique within the same hierarchy level"])
end

context "if locale is set to 'de'" do
it "is invalid with localized validation errors" do
I18n.with_locale(:de) do
result = subject.call(params)
expect(result).to be_failure
# TODO: This needs to be switched to german once the german translation is merged.
expect(result.errors.to_h).to include(label: ["must be unique within the same hierarchy level"])
end
end
end
end

context "when short is set and is a string" do
Expand Down

0 comments on commit 7928794

Please sign in to comment.