mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
[#69399] Better wording
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user