OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[chore] make flickering disappear
Eric Schubertf46f7d04d49f
diff --git a/spec/contracts/custom_fields/hierarchy/insert_item_contract_spec.rb b/spec/contracts/custom_fields/hierarchy/insert_item_contract_spec.rbindex 6f5606d9f25..a28a7ddb14f 100644--- a/spec/contracts/custom_fields/hierarchy/insert_item_contract_spec.rb+++ b/spec/contracts/custom_fields/hierarchy/insert_item_contract_spec.rb@@ -67,15 +67,27 @@ RSpec.describe CustomFields::Hierarchy::InsertItemContract doit "is invalid" doresult = subject.call(params)expect(result).to be_failure- expect(result.errors.to_h).to include(label: ["must be unique within the same hierarchy level."])+ expect(result.errors.to_h).to include(label: [I18n.t("dry_validation.errors.rules.label.not_unique")])end- context "if locale is set to 'de'" do+ context "if another locale is set" do+ let(:mordor) { "agh burzum-ishi krimpatul" }++ before do+ I18n.config.enforce_available_locales = false+ I18n.backend.store_translations(+ :mo,+ { dry_validation: {+ errors: { rules: { label: { not_unique: mordor } } }+ } }+ )+ end+it "is invalid with localized validation errors" do- I18n.with_locale(:de) do+ I18n.with_locale(:mo) doresult = subject.call(params)expect(result).to be_failure- expect(result.errors.to_h).to include(label: ["muss innerhalb der gleichen Hierarchieebene eindeutig sein."])+ expect(result.errors.to_h).to include(label: [mordor])endendend@@ -89,7 +101,7 @@ RSpec.describe CustomFields::Hierarchy::InsertItemContract doit "is invalid with localized validation errors" doresult = subject.call(params)expect(result).to be_failure- expect(result.errors.to_h).to include(short: ["must be unique within the same hierarchy level."])+ expect(result.errors.to_h).to include(short: [I18n.t("dry_validation.errors.rules.short.not_unique")])endend@@ -108,7 +120,7 @@ RSpec.describe CustomFields::Hierarchy::InsertItemContract doit "is invalid" doresult = subject.call(params)expect(result).to be_failure- expect(result.errors.to_h).to include(short: ["must be a string"])+ expect(result.errors.to_h).to include(short: [I18n.t("dry_validation.errors.str?")])endend