Skip to content

Commit b831662

Browse files
committed
fix(test): LAR-175 update test condition
1 parent 91e2ada commit b831662

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

tests/Feature/Filament/ArticleResourceTest.php

+6-9
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@
3333
Livewire::test(ArticleResource\Pages\ListArticles::class)
3434
->callTableAction('approved', $article);
3535

36-
expect($article->approved_at)
37-
->not()
38-
->toBe(null)
39-
->and($article->declined_at)
40-
->toBe(null);
36+
$article->refresh();
37+
38+
expect($article->approved_at)->toBeInstanceOf(\Carbon\Carbon::class)
39+
->and($article->declined_at)->toBeNull();
4140

4241
Livewire::test(ArticleResource\Pages\ListArticles::class)
4342
->assertTableActionHidden('approved', $article)
@@ -54,10 +53,8 @@
5453

5554
$article->refresh();
5655

57-
expect($article->declined_at)
58-
->toBeInstanceOf(\Carbon\Carbon::class)
59-
->and($article->approved_at)
60-
->toBeNull();
56+
expect($article->declined_at)->toBeInstanceOf(\Carbon\Carbon::class)
57+
->and($article->approved_at)->toBeNull();
6158

6259
Livewire::test(ArticleResource\Pages\ListArticles::class)
6360
->assertTableActionHidden('approved', $article)

0 commit comments

Comments
 (0)