Files
Amaury a26efefd01 Feature/adc/#50 users settings route (#89)
* #50 - migration 20221023123919_ + route settings

* #50 - migration 20221023123919_ + route settings

* #50 - settings creation at user creation + update migration

* changed settings acces from by id to userId

* deleting the user results in deleting it's associated userSettings row

* pr fixes + robot tests + other minor fixes

* removed useless comments

* added settings endpoint to /auth/me and automated creation to /register

* clean code before merge
2023-04-12 05:32:41 +03:00

28 lines
1.1 KiB
Plaintext

*** Settings ***
Documentation Tests of the /settings route.
... Ensures that the settings CRUD works corectly as well as the automation with the user creation.
Resource ../rest.resource
Resource ../auth/auth.resource
*** Test Cases ***
Get settings
[Documentation] Create a user and get associated settings
${userID}= RegisterLogin 2na-min-faranssa-wa-2na-adrus-allu3'at-al3rabia
&{get}= GET /auth/me/settings/
Output
Should Be True ${get.body.emailNotification}
Integer response status 200
[Teardown] DELETE /users/${userID}
Patch settingspushNotification
${userID}= RegisterLogin 2na-min-faranssa-wa-2na-adrus-allu3'at-al3rabia
&{patch}= PATCH
... /auth/me/settings/
... {"pushNotification": true, "emailNotification": true, "trainingNotification": true, "newSongNotification": true, "recommendations": true, "weeklyReport": true, "leaderBoard": false, "showActivity": true}
Output
Should Not Be True ${patch.body.leaderBoard}
Integer response status 200
[Teardown] DELETE /users/${userID}