first work on front events

This commit is contained in:
2020-08-24 07:55:32 +02:00
parent 0f4250a029
commit f466ce7cc9
17 changed files with 575 additions and 32 deletions

View File

@@ -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()
{