. _common.sh
-# Ensure that the databse doesn't already contain the current user
-# - 1. Protects against running the test against the production database
-# - 2. Allows adding the current user as an admin
-if $DISPENSE acct "$USER"; then
- FAIL "Database contains '$USER'"
-fi
-# Add the current user as an admin
-sqlite3 "${BASEDIR}cokebank.db" "INSERT INTO accounts (acct_name,acct_is_admin,acct_uid) VALUES ('${USER}',1,1);"
+TRY_COMMAND "$DISPENSE acct ${USER}"
+TRY_COMMAND "$DISPENSE pseudo:0"
# Try to add a new user
TRY_COMMAND "$DISPENSE user add unittest_user0"