first work on front events
This commit is contained in:
@@ -172,7 +172,7 @@ class EventsTest extends TestCase
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function only_the_admin_can_patch_the_memo()
|
||||
public function only_the_admin_can_patch_the_event_category()
|
||||
{
|
||||
$this->actingAs($user = factory(User::class)->create(), 'api');
|
||||
$category = EventCategory::create(['name' => 'Test category', 'description' => 'Test description']);
|
||||
@@ -305,6 +305,19 @@ class EventsTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function all_event_can_be_retrieved()
|
||||
{
|
||||
$this->actingAs($user = factory(User::class)->create(), 'api');
|
||||
$events = factory(Event::class, 10)->create(['user_id' => $user->id]);
|
||||
|
||||
$response = $this->get('/api/events');
|
||||
|
||||
$response->assertStatus(200);
|
||||
|
||||
$this->assertCount(10, Event::all());
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function a_to_event_can_be_patch()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user