Get User Events

Let's add the functionality to display all events on the dashboard

It’s time to display new events on the user dashboard. We’ll display these within a calendar using a library that we’ll set up later in this chapter.

Below is our updated code. Use this to make further changes:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>LetsGetLunch</title>
  <base href="/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
  <app-root></app-root>
</body>
</html>
Updated code so far

Tests for getUserEvents

First we need to associate all events with a given user. View the documentation for this endpoint within the “Get Events for a User” section titled in the API documentation.

Test case: success

Start by adding our first test for this endpoint as follows:

  1. Create a few variables: user, eventResponse, and ...