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/MailListModelFeatureTest.php
<?php

/**
 * MailList model feature tests.
 *
 * Tests list model behavior, required fields, and configuration options.
 */

use App\Model\MailList;

test('mail list model accepts attributes', function () {
    $list = new MailList([
        'name' => 'Newsletter Subscribers',
        'from_email' => '[email protected]',
        'from_name' => 'Newsletter Team',
    ]);

    expect($list->name)->toBe('Newsletter Subscribers');
    expect($list->from_email)->toBe('[email protected]');
    expect($list->from_name)->toBe('Newsletter Team');
});

test('mail list has required fillable fields', function () {
    $list = new MailList();
    $fillable = $list->getFillable();

    expect($fillable)->toContain('name');
    expect($fillable)->toContain('from_email');
    expect($fillable)->toContain('from_name');
});

test('mail list notification options are fillable', function () {
    $list = new MailList();
    $fillable = $list->getFillable();

    expect($fillable)->toContain('send_welcome_email');
    expect($fillable)->toContain('subscribe_confirmation');
    expect($fillable)->toContain('unsubscribe_notification');
});