mirror of
https://github.com/flarum/core.git
synced 2025-08-06 16:36:47 +02:00
Fix user ShowTests
This commit is contained in:
committed by
Matthew Kilgore
parent
a155e41432
commit
dde718e27f
@@ -158,7 +158,11 @@ class ShowTest extends TestCase
|
||||
*/
|
||||
public function user_can_see_others_if_allowed()
|
||||
{
|
||||
$this->
|
||||
$this->prepareDatabase([
|
||||
'group_permission' => [
|
||||
['permission' => 'viewDiscussions', 'group_id' => 3],
|
||||
]
|
||||
]);
|
||||
|
||||
$response = $this->send(
|
||||
$this->request('GET', '/api/users/1', [
|
||||
@@ -166,7 +170,7 @@ class ShowTest extends TestCase
|
||||
])
|
||||
);
|
||||
|
||||
$this->assertEquals(404, $response->getStatusCode());
|
||||
$this->assertEquals(200, $response->getStatusCode());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,6 +178,12 @@ class ShowTest extends TestCase
|
||||
*/
|
||||
public function user_can_see_others_if_allowed_via_slug()
|
||||
{
|
||||
$this->prepareDatabase([
|
||||
'group_permission' => [
|
||||
['permission' => 'viewDiscussions', 'group_id' => 3],
|
||||
]
|
||||
]);
|
||||
|
||||
$response = $this->send(
|
||||
$this->request('GET', '/api/users/admin', [
|
||||
'authenticatedAs' => 2,
|
||||
@@ -182,6 +192,6 @@ class ShowTest extends TestCase
|
||||
])
|
||||
);
|
||||
|
||||
$this->assertEquals(404, $response->getStatusCode());
|
||||
$this->assertEquals(200, $response->getStatusCode());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user