Skip to content

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

adjust test with the changes into error text

bsatarnejad9bb7708e2bf6
diff --git a/spec/contracts/work_packages/shared_base_contract.rb b/spec/contracts/work_packages/shared_base_contract.rb
index fe150ab1daa..aab9f50d3fc 100644
--- a/spec/contracts/work_packages/shared_base_contract.rb
+++ b/spec/contracts/work_packages/shared_base_contract.rb
@@ -81,8 +81,8 @@ shared_examples_for 'work package contract' do
context 'if the assigned user is not a possible assignee' do
it 'is not a valid assignee' do
- error = I18n.t('api_v3.errors.validation.invalid_user_assigned_to_work_package',
- property: I18n.t('attributes.assignee'))
+ error = ": #{I18n.t('api_v3.errors.validation.invalid_user_assigned_to_work_package',
+ property: I18n.t('attributes.assignee'))}"
expect(validated_contract.errors[:assigned_to]).to match_array [error]
end
end
@@ -107,8 +107,8 @@ shared_examples_for 'work package contract' do
context 'if the assigned user is not a possible responsible' do
it 'is not a valid responsible' do
- error = I18n.t('api_v3.errors.validation.invalid_user_assigned_to_work_package',
- property: I18n.t('attributes.responsible'))
+ error = ": #{I18n.t('api_v3.errors.validation.invalid_user_assigned_to_work_package',
+ property: I18n.t('attributes.responsible'))}"
expect(validated_contract.errors[:responsible]).to match_array [error]
end
end