diff options
Diffstat (limited to 'spec/models/work_item_spec.rb')
-rw-r--r-- | spec/models/work_item_spec.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/models/work_item_spec.rb b/spec/models/work_item_spec.rb index 5a525d83c3b..e0ec54fd5ff 100644 --- a/spec/models/work_item_spec.rb +++ b/spec/models/work_item_spec.rb @@ -132,7 +132,7 @@ RSpec.describe WorkItem, feature_category: :portfolio_management do subject { work_item.supported_quick_action_commands } it 'returns quick action commands supported for all work items' do - is_expected.to include(:title, :reopen, :close, :cc, :tableflip, :shrug, :type) + is_expected.to include(:title, :reopen, :close, :cc, :tableflip, :shrug, :type, :promote_to) end context 'when work item supports the assignee widget' do @@ -461,8 +461,13 @@ RSpec.describe WorkItem, feature_category: :portfolio_management do it 'does not allow to change types' do expect(child.valid?).to eq(false) - expect(child.errors[:work_item_type_id]) - .to include("cannot be changed to #{new_type.name} with #{parent.work_item_type.name} as parent type.") + expect(child.errors[:work_item_type_id]).to include( + format( + "cannot be changed to %{type_name} when linked to a parent %{parent_name}.", + type_name: new_type.name.downcase, + parent_name: parent.work_item_type.name.downcase + ) + ) end end end |