- Fixes subscribers not being added to list(s) upon import
This commit is contained in:
@@ -378,7 +378,7 @@ class Import {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
$this->addSubscribersToSegments(
|
$this->addSubscribersToSegments(
|
||||||
array_keys($result),
|
$result,
|
||||||
$this->segments
|
$this->segments
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
|
@@ -318,7 +318,6 @@ class ImportTest extends MailPoetTest {
|
|||||||
->equals($subscribers_data[$custom_field][1]);
|
->equals($subscribers_data[$custom_field][1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function testItCanAddSubscribersToSegments() {
|
function testItCanAddSubscribersToSegments() {
|
||||||
$subscribers_data = $this->subscribers_data;
|
$subscribers_data = $this->subscribers_data;
|
||||||
$this->import->createOrUpdateSubscribers(
|
$this->import->createOrUpdateSubscribers(
|
||||||
@@ -336,9 +335,17 @@ class ImportTest extends MailPoetTest {
|
|||||||
$db_subscribers,
|
$db_subscribers,
|
||||||
array($this->segment_1->id, $this->segment_2->id)
|
array($this->segment_1->id, $this->segment_2->id)
|
||||||
);
|
);
|
||||||
$subscribers_segments = SubscriberSegment::findArray();
|
|
||||||
// 2 subscribers * 2 segments
|
// 2 subscribers * 2 segments
|
||||||
expect(count($subscribers_segments))->equals(4);
|
foreach($db_subscribers as $db_subscriber) {
|
||||||
|
$subscriber_segment_1 = SubscriberSegment::where('subscriber_id', $db_subscriber)
|
||||||
|
->where('segment_id', $this->segment_1->id)
|
||||||
|
->findOne();
|
||||||
|
expect($subscriber_segment_1)->notEmpty();
|
||||||
|
$subscriber_segment_2 = SubscriberSegment::where('subscriber_id', $db_subscriber)
|
||||||
|
->where('segment_id', $this->segment_2->id)
|
||||||
|
->findOne();
|
||||||
|
expect($subscriber_segment_2)->notEmpty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function testItCanDeleteExistingTrashedSubscribers() {
|
function testItCanDeleteExistingTrashedSubscribers() {
|
||||||
|
Reference in New Issue
Block a user