Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
Test Case #:856 | Test Case Name: |
System: OpenLMIS
| Subsystem:Requisition |
Test case designed by: Piotr Żurawski | Design Date:25.07.2016 |
Short description: Check if OpenLMIS is blocking creating more than one account with the same username. | |
Step | Action | Expected system response | Comment |
1 | Create user. Method: POST. URL: http://localhost:8080/api/users Body: { "username":"lmisUserName", "password":"lmisPassw", "firstName":"olmisFirstName", "lastName":"olmisLastName" } | { "username": "lmisUserName", "firstName": "olmisFirstName", "lastName": "olmisLastName", "verified": false, "active": false, "_links": { "self": { "href": "http://localhost:8080/api/users/f4d84f0e-6d49-419f-bda8-6a7609b369c1" }, "user": { "href": "http://localhost:8080/api/users/f4d84f0e-6d49-419f-bda8-6a7609b369c1" }, "roles": { "href": "http://localhost:8080/api/users/f4d84f0e-6d49-419f-bda8-6a7609b369c1/roles" }, "homeFacility": { "href": "http://localhost:8080/api/users/f4d84f0e-6d49-419f-bda8-6a7609b369c1/homeFacility" } } } | |
2 | Try to create account with the same username(repeat step no. 1). | { "cause": { "cause": { "cause": null, "message": "ERROR: duplicate key value violates unique constraint \"uk_r43af9ap4edm43mmtq01oddj6\"\n Detail: Key (username)=(lmisUserName) already exists." }, "message": "could not execute statement" }, "message": "could not execute statement; SQL [n/a]; constraint [uk_r43af9ap4edm43mmtq01oddj6]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement" } | |
|
---|