First, we begin our development by writing tests. Since the validation logic of the Login endpoint works in the same way as our endpoints, we can simply copy those scenarios from our other tests:
Feature: Login User Test that we can create a user using a digest and then perform a login that returns successfully Background: Create User with email and password digest Given 1 new user is created with random password and email Scenario Outline: Bad Client Requests ... Scenario Outline: Bad Request Payload ... Scenario Outline: Request Payload with Properties of Unsupported Type ... Scenario Outline: Request Payload with invalid email format ... Scenario Outline: Request Payload with invalid digest format ...
Next, we can specify ...