25 lines
712 B
PHP
25 lines
712 B
PHP
<?php
|
|
|
|
namespace Tests\Unit\Models;
|
|
|
|
use App\Models\IpAttempt;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class IpAttemptTest extends TestCase
|
|
{
|
|
public function test_model_metadata_is_converted(): void
|
|
{
|
|
$model = new IpAttempt;
|
|
|
|
$this->assertSame('ip_attempts', $model->getTable());
|
|
$this->assertSame('id', $model->getKeyName());
|
|
$this->assertSame(true, $model->timestamps);
|
|
$this->assertSame(['ip_address', 'attempts', 'last_attempt_at', 'blocked_until', 'created_at', 'updated_at', 'school_year', 'semester'], $model->getFillable());
|
|
}
|
|
|
|
public function test_model_class_loads(): void
|
|
{
|
|
$this->assertInstanceOf(IpAttempt::class, new IpAttempt);
|
|
}
|
|
}
|