Skip to content

Commit 5cfff26

Browse files
committed
imrpove test
1 parent 3b7e1f2 commit 5cfff26

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/Feature/Api/SiteControllerTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ public function testRegisteringASiteTwiceCreatesOnlyOneRow(): void
8484

8585
$this->postJson(
8686
'/api/v1/register',
87-
["url" => "https://www.joomla.org", "key" => "foobar123foobar123foobar123foobar123"]
87+
["url" => "https://www.joomla.org", "key" => "abcdef"]
8888
);
8989

90-
$count = Site::where('url', 'https://www.joomla.org')->count();
91-
$this->assertEquals(1, $count);
90+
$rows = Site::where('url', 'https://www.joomla.org')->get();
91+
$this->assertEquals(1, $rows->count());
92+
$this->assertEquals('abcdef', $rows->first()->key);
9293
}
9394

9495
public function testRegisteringASiteFailsWhenHealthCheckFails(): void

0 commit comments

Comments
 (0)