<?php

use App\Models\News;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

test('news can be created using factory', function () {
    $news = News::factory()->create([
        'title' => 'Kabar Purwakarta',
        'slug' => 'kabar-purwakarta',
    ]);
    expect($news->title)->toBe('Kabar Purwakarta');
    expect($news->slug)->toBe('kabar-purwakarta');
});
