mirror of
https://github.com/flarum/core.git
synced 2025-08-07 08:56:38 +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()
|
public function user_can_see_others_if_allowed()
|
||||||
{
|
{
|
||||||
$this->
|
$this->prepareDatabase([
|
||||||
|
'group_permission' => [
|
||||||
|
['permission' => 'viewDiscussions', 'group_id' => 3],
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
$response = $this->send(
|
$response = $this->send(
|
||||||
$this->request('GET', '/api/users/1', [
|
$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()
|
public function user_can_see_others_if_allowed_via_slug()
|
||||||
{
|
{
|
||||||
|
$this->prepareDatabase([
|
||||||
|
'group_permission' => [
|
||||||
|
['permission' => 'viewDiscussions', 'group_id' => 3],
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
$response = $this->send(
|
$response = $this->send(
|
||||||
$this->request('GET', '/api/users/admin', [
|
$this->request('GET', '/api/users/admin', [
|
||||||
'authenticatedAs' => 2,
|
'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