mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-15 01:03:16 +01:00
Move billable rate restriction tests to the endpoint tests of the specific endpoints
This commit is contained in:
@@ -300,4 +300,20 @@ class ChartEndpointTest extends EndpointTestAbstract
|
||||
// Assert
|
||||
$response->assertOk();
|
||||
}
|
||||
|
||||
public function test_total_weekly_billable_amount_is_forbidden_if_organization_can_not_use_billable_rates(): void
|
||||
{
|
||||
// Arrange
|
||||
$data = $this->createUserWithPermission([
|
||||
'charts:view:own',
|
||||
]);
|
||||
$this->actAsOrganizationWithoutBillableRates();
|
||||
Passport::actingAs($data->user);
|
||||
|
||||
// Act
|
||||
$response = $this->getJson(route('api.v1.charts.total-weekly-billable-amount', [$data->organization->getKey()]));
|
||||
|
||||
// Assert
|
||||
$response->assertForbidden();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user