File: /home/xedaptot/be.naniguide.com/tests/Feature/TrackingLogFeatureTest.php
<?php
/**
* TrackingLog model feature tests.
*/
use App\Model\TrackingLog;
test('tracking log status constants are defined', function () {
expect(TrackingLog::STATUS_SENT)->toBe('sent');
expect(TrackingLog::STATUS_FAILED)->toBe('failed');
expect(TrackingLog::STATUS_DUPLICATE)->toBe('duplicate');
});
test('tracking log model accepts attributes', function () {
$log = new TrackingLog([
'message_id' => 'test-123@acelle',
'status' => TrackingLog::STATUS_SENT,
]);
expect($log->message_id)->toBe('test-123@acelle');
expect($log->status)->toBe(TrackingLog::STATUS_SENT);
});
test('tracking log has required fillable fields', function () {
$log = new TrackingLog();
$fillable = $log->getFillable();
expect($fillable)->toContain('message_id');
expect($fillable)->toContain('status');
expect($fillable)->toContain('campaign_id');
expect($fillable)->toContain('subscriber_id');
expect($fillable)->toContain('customer_id');
expect($fillable)->toContain('sending_server_id');
});