true]); $user = $this->signin(); $response = $this->json('GET', '/api/statistics'); $response->assertStatus(200); $response->assertJsonStructure([ $this->jsonStructure, ]); } /** @test */ public function it_returns_an_error_if_public_statistics_are_not_available() { config(['monica.allow_statistics_through_public_api_access' => false]); $user = $this->signin(); $response = $this->json('GET', '/api/statistics'); $this->expectNotFound($response); } }