HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: /home/xedaptot/ai.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');
});