diff --git a/app/mutations/points/destroy.rb b/app/mutations/points/destroy.rb index bd254b7af..09ed80c01 100644 --- a/app/mutations/points/destroy.rb +++ b/app/mutations/points/destroy.rb @@ -1,8 +1,7 @@ module Points class Destroy < Mutations::Command STILL_IN_USE = "Could not delete the following item(s): %s. Item(s) are "\ - "in use by the following sequence(s): %s." - + "in use by the following sequence(s): %s." JUST_ONE = "Could not delete %s. Item is in use by the following "\ "sequence(s): %s." diff --git a/spec/mutations/points/destroy_edge_cases_spec.rb b/spec/mutations/points/destroy_edge_cases_spec.rb index 0ffc7b8f4..273f38f63 100644 --- a/spec/mutations/points/destroy_edge_cases_spec.rb +++ b/spec/mutations/points/destroy_edge_cases_spec.rb @@ -24,10 +24,10 @@ describe "Point deletion edge cases" do offset: { kind: "coordinate", args: { x: 0, y: 0, z: 0} } }, }]) - result = Points::Destroy.run(point_ids: [tool_slot.id], device: device) - errors = result.errors.message_list - expected = "Could not delete the following item(s): foo tool. Item(s) are "\ - "in use by the following sequence(s): sequence." + result = Points::Destroy.run(point_ids: [tool_slot.id], device: device) + errors = result.errors.message_list + expected = "Could not delete foo tool. Item is in use by the following "\ + "sequence(s): sequence." expect(errors).to include(expected) end end diff --git a/spec/mutations/points/destroy_spec.rb b/spec/mutations/points/destroy_spec.rb index 66d7ffc08..04f18574a 100644 --- a/spec/mutations/points/destroy_spec.rb +++ b/spec/mutations/points/destroy_spec.rb @@ -48,9 +48,8 @@ describe Points::Destroy do point_ids = [s.tool_slot.id] result = Points::Destroy.run(point_ids: point_ids, device: s.device) expect(result.success?).to be(false) - expected = "Could not delete the following item(s): Scenario Tool. "\ - "Item(s) are in use by the following sequence(s): Scenario "\ - "Sequence." + expected = "Could not delete Scenario Tool. Item is in use by the "\ + "following sequence(s): Scenario Sequence." expect(result.errors.message_list).to include(expected) end