[#69399] Better wording

This commit is contained in:
Tobias Dillmann
2025-12-11 14:18:36 +01:00
parent 66190aeadb
commit c4f32085e0
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -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,
@@ -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