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
This commit is contained in:
Amaury
2023-04-12 05:32:41 +03:00
committed by GitHub
parent e43a8fd111
commit a26efefd01
15 changed files with 278 additions and 16 deletions
+27
View File
@@ -0,0 +1,27 @@
*** 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}