Display proper notices for segment actions
This updates some of the segment listing messages to include the name of the segment to avoid confusion, and allows for the possibility that bulk actions will work for some segments but not all, in which case we need to show both success and error messages. MAILPOET-5395
This commit is contained in:
committed by
Aschepikov
parent
28ca417261
commit
6675a616b5
@@ -121,7 +121,7 @@ class DynamicSegmentsTest extends \MailPoetTest {
|
||||
$response = $this->endpoint->trash(['id' => $dynamicSegment->getId()]);
|
||||
$this->entityManager->refresh($dynamicSegment);
|
||||
verify($response->status)->equals(APIResponse::STATUS_BAD_REQUEST);
|
||||
verify($response->errors[0]['message'])->equals("Segment cannot be deleted because it’s used for 'Subject' email");
|
||||
verify($response->errors[0]['message'])->equals("Segment '{$dynamicSegment->getName()}' cannot be deleted because it’s used for 'Subject' email");
|
||||
}
|
||||
|
||||
public function testItCanRestoreASegment() {
|
||||
|
Reference in New Issue
Block a user