From c4f32085e00438c9ac51cfbdb994791a26f49a20 Mon Sep 17 00:00:00 2001 From: Tobias Dillmann Date: Thu, 11 Dec 2025 14:18:36 +0100 Subject: [PATCH] [#69399] Better wording --- spec/models/project_custom_field_spec.rb | 6 +++--- .../bulk_update_service_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/models/project_custom_field_spec.rb b/spec/models/project_custom_field_spec.rb index f5609a6b466..314d25e6add 100644 --- a/spec/models/project_custom_field_spec.rb +++ b/spec/models/project_custom_field_spec.rb @@ -71,13 +71,13 @@ RSpec.describe ProjectCustomField do end let!(:another_project) { create(:project) } # not using the custom field - it "activates the mandatory project custom fields in all projects where it is not already activated" do + it "activates for_all project custom fields in all projects where it is not already activated" do expect(ProjectCustomFieldProjectMapping).to exist(custom_field_id: project_custom_field.id, project_id: project.id) expect(ProjectCustomFieldProjectMapping).not_to exist(custom_field_id: project_custom_field.id, project_id: another_project.id) - project_custom_field.update!(is_for_all: true) # mandatory now + project_custom_field.update!(is_for_all: true) # forced active now expect(ProjectCustomFieldProjectMapping).to exist(custom_field_id: project_custom_field.id, project_id: project.id) @@ -86,7 +86,7 @@ RSpec.describe ProjectCustomField do end it "does not disable project custom fields when set to optional" do - project_custom_field.update!(is_for_all: true) # mandatory now + project_custom_field.update!(is_for_all: true) # forced active now project_custom_field.update!(is_for_all: false) # optional again expect(ProjectCustomFieldProjectMapping).to exist(custom_field_id: project_custom_field.id, diff --git a/spec/services/project_custom_field_project_mappings/bulk_update_service_spec.rb b/spec/services/project_custom_field_project_mappings/bulk_update_service_spec.rb index 05e2d029ccf..a4b3774ec11 100644 --- a/spec/services/project_custom_field_project_mappings/bulk_update_service_spec.rb +++ b/spec/services/project_custom_field_project_mappings/bulk_update_service_spec.rb @@ -70,7 +70,7 @@ RSpec.describe ProjectCustomFieldProjectMappings::BulkUpdateService do context "with admin permissions" do let(:user) { create(:admin) } - it "bulk enables/disables all (non-mandatory) fields of the section, including invisible ones" do + it "bulk enables/disables all (non-for_all) fields of the section, including invisible ones" do expect(project.project_custom_fields).to contain_exactly(visible_activated_project_custom_field) expect(instance.call(action: :enable)).to be_success @@ -85,7 +85,7 @@ RSpec.describe ProjectCustomFieldProjectMappings::BulkUpdateService do expect(instance.call(action: :disable)).to be_success - # mandatory fields cannot be disabled, even not by admins + # for_all fields cannot be disabled, even not by admins expect(project.reload.project_custom_fields).to contain_exactly(visible_activated_project_custom_field) end end