Update unit tests for pagination

This commit is contained in:
Nathan Barber
2021-05-10 17:48:46 -04:00
parent 16c37cd5fe
commit 8d4c276652
13 changed files with 87 additions and 189 deletions

View File

@@ -33,6 +33,10 @@ const withAPI = withProps((props) => ({
}),
deleteUser: (username) => jhapiRequest("/users/" + username, "DELETE"),
findUser: (username) => jhapiRequest("/users/" + username, "GET"),
validateUser: (username) =>
findUser(username)
.then((data) => data.status)
.then((data) => (data > 200 ? false : true)),
failRegexEvent: () =>
alert(
"Cannot change username - either contains special characters or is too short."