Update tests for new MySQL version
[MAILPOET-2640]
This commit is contained in:
committed by
Rostislav Wolný
parent
3b9ba5cac2
commit
2496cb7fce
@ -79,9 +79,7 @@ class SegmentsTest extends \MailPoetTest {
|
||||
|
||||
$response = $this->endpoint->save($duplicateEntry);
|
||||
expect($response->status)->equals(APIResponse::STATUS_BAD_REQUEST);
|
||||
expect($response->errors[0]['message'])->equals(
|
||||
'Another record already exists. Please specify a different "name".'
|
||||
);
|
||||
expect($response->errors[0]['message'])->regExp('/Another record already exists. Please specify a different ".*name"./');
|
||||
}
|
||||
|
||||
public function testItCanRestoreASegment() {
|
||||
|
@ -47,7 +47,8 @@ class SaverTest extends \MailPoetTest {
|
||||
'description' => 'desc2',
|
||||
'id' => $dynamicSegment1->id,
|
||||
]);
|
||||
$this->setExpectedException('\MailPoet\DynamicSegments\Exceptions\ErrorSavingException', 'Another record already exists. Please specify a different "PRIMARY".', Model::DUPLICATE_RECORD);
|
||||
$this->expectException('\MailPoet\DynamicSegments\Exceptions\ErrorSavingException');
|
||||
$this->expectExceptionCode(Model::DUPLICATE_RECORD);
|
||||
$this->saver->save($dynamicSegment2);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user