Skip to content

Commit 3db0e2c

Browse files
committed
Resolved - A guest or an authenticated user can list questions (laravel-portugal#26) - Refactoring
1 parent 6824f33 commit 3db0e2c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

domains/Discussions/Tests/Feature/QuestionsGetTest.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected function setUp(): void
2727
/** @test */
2828
public function it_possible_to_see_a_question(): void
2929
{
30-
$this->get(route('discussions.questions.index'))
30+
$response = $this->get(route('discussions.questions.index'))
3131
->seeJsonStructure([
3232
'data' => [
3333
[
@@ -42,6 +42,8 @@ public function it_possible_to_see_a_question(): void
4242
]
4343
]
4444
]);
45+
46+
$this->assertEquals(15, count($response->decodedJsonResponse()['data']));
4547
}
4648

4749
/** @test */
@@ -86,7 +88,8 @@ public function it_supports_pagination_navigation(): void
8688
{
8789
$response = $this->get(route('discussions.questions.index', ['page' => 2]));
8890
$response->assertResponseOk();
89-
self::assertEquals(2, $response->decodedJsonResponse()['meta']['current_page']);
91+
$this->assertEquals(2, $response->decodedJsonResponse()['meta']['current_page']);
92+
$this->assertEquals(2, $response->decodedJsonResponse()['meta']['current_page']);
9093
}
9194

9295
/** @test */

0 commit comments

Comments
 (0)