summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2016-12-03 17:32:49 +0000
committerRichard Maw <richard.maw@gmail.com>2016-12-03 17:32:49 +0000
commit5c005c3bb724636c7cb146fffa5827a717347b3c (patch)
tree091ee49f2b337b9515daebb5c364561c136cfd42 /testing
parent4cc65288908de0a4483ebba60c15056261cb3e9b (diff)
downloadgitano-5c005c3bb724636c7cb146fffa5827a717347b3c.tar.gz
testing: Test user details change and rename
Diffstat (limited to 'testing')
-rw-r--r--testing/02-commands-user.yarn31
1 files changed, 29 insertions, 2 deletions
diff --git a/testing/02-commands-user.yarn b/testing/02-commands-user.yarn
index 6896c46..9cf4e41 100644
--- a/testing/02-commands-user.yarn
+++ b/testing/02-commands-user.yarn
@@ -17,11 +17,38 @@ Privileged users may create other users though.
AND testinstance adminkey runs user list
THEN stdout contains ^bob
+The e-mail address and real name provided in the create command are also listed.
+
+ AND stdout contains ^bob.*bob@testinstance
+ AND stdout contains ^bob.*Bob Bobertson
+
+The e-mail address can be changed,
+which is handy for if the user changes e-mail provider.
+
+ WHEN testinstance adminkey runs user email bob bob@example.com
+ AND testinstance adminkey runs user list
+ THEN stdout contains ^bob.*bob@example.com
+
+A user's real name may also be changed.
+
+ WHEN testinstance adminkey runs user name bob Robert Robertson
+ AND testinstance adminkey runs user list
+ THEN stdout contains ^bob.*Robert Robertson
+
+Privileged users may also rename other users.
+
+ WHEN testinstance adminkey runs user rename bob robert --force
+ THEN stderr contains SSH authorised key file updated
+ AND stderr contains Committed: Rename user bob to robert
+ WHEN testinstance adminkey runs user list
+ THEN stdout contains ^robert
+ THEN stdout does not contain ^bob
+
Privileged users may delete other users.
- WHEN testinstance adminkey runs user del bob --force
+ WHEN testinstance adminkey runs user del robert --force
THEN stderr contains SSH authorised key file updated
- THEN stderr contains Committed: Delete user bob
+ THEN stderr contains Committed: Delete user robert
WHEN testinstance adminkey runs user list
THEN stdout does not contain ^bob