To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorViewing a user
As a PasNL-terminal remote manager
I want to scan the barcode of a client card
In order to view and edit her account balance
- Background Create a remote manager and a program
-
- Given
- a program with name "301"
- And
- I have an user "martijn" with password "dekker"
- And
-
I send a POST request to "/api/v1/admin/login" :
{ "username":"martijn", "password":"dekker" }
- Scenarios
-
- Can retrieve user by barcode
- Asking information about an unknown barcode gives an error
- Asking information with wrong token
- Can retrieve user by barcode
-
- Given
- an enduser with barcode "123456789"
- When
- I send a GET request to "/api/v1/admin/users/123456789"
- Then
- "balance" in json is "1.0"
- And
- "email" in json is "[email protected]"
- And
- "gender" in json is "m"
- And
- I get a status "200" as response
- Asking information about an unknown barcode gives an error
-
- Given
- an enduser with barcode "123456789"
- When
- I send a GET request to "/api/v1/admin/users/99999999"
- Then
- "message" in json is "barcode is geen onderdeel van dit programma"
- Asking information with wrong token
-
- Given
- an enduser with barcode "999999999"
- When
- I send a GET request with wrong token to "/api/v1/admin/users/999999999"
- Then
- I get a status "401" as response
Last published over 7 years ago by martijn dekker.