From 0b4703284bf49245ecf7e313397d3e74868b1369 Mon Sep 17 00:00:00 2001 From: Michael Wilson <70765247+hobbitronics@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:48:21 +0930 Subject: [PATCH] Apply suggestions from code review Co-authored-by: briskt <3172830+briskt@users.noreply.github.com> --- api.raml | 14 ++++++++------ application/features/user.feature | 3 +-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/api.raml b/api.raml index 6189b61c..cdcde181 100644 --- a/api.raml +++ b/api.raml @@ -458,12 +458,14 @@ types: 200: description: Successfully updated the last login time. body: - application/json: - example: | - { - "employee_id": "f6bf51f2-4ccc-4d85-8f75-02132c67af27", - "last_login_utc": "2024-09-18T12:34:56Z" - } + properties: + employee_id: string + last_login_utc: string + example: | + { + "employee_id": "12345", + "last_login_utc": "2024-09-18T12:34:56Z" + } 404: description: Not found. The user with the specified `employeeId` was not found. 500: diff --git a/application/features/user.feature b/application/features/user.feature index 2f177193..8db1293f 100644 --- a/application/features/user.feature +++ b/application/features/user.feature @@ -137,14 +137,13 @@ Feature: User Scenario: update the last_login_utc of an existing user Given the requester is authorized - And I add a user with a employee_id of "123" + And I add a user with an employee_id of "123" And a record exists with an employee_id of "123" When I request "/user/123/update-last-login" be updated Then the response status code should be "200" And a record exists with an employee_id of "123" And last_login_utc should be stored as now UTC And the only property to change should be last_login_utc - #* @Then /^a record exists with (?:a|an) (.*) of "?([^"]*)"?$/ Scenario: Deactivate an existing user Given a record does not exist with an employee_id of "123"