Improve tests
This commit is contained in:
parent
427debaba4
commit
48d1c9a00b
18 changed files with 267 additions and 14 deletions
|
@ -79,5 +79,12 @@ class ArticlesTest extends TestCase
|
|||
|
||||
$emptyScope = Article::date()->get();
|
||||
$this->assertCount(2, $emptyScope);
|
||||
|
||||
// Check the December case
|
||||
$article = Article::factory()->create([
|
||||
'created_at' => Carbon::now()->setMonth(12)->toDateTimeString(),
|
||||
'updated_at' => Carbon::now()->setMonth(12)->toDateTimeString(),
|
||||
]);
|
||||
$this->assertCount(1, Article::date(date('Y'), 12)->get());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue