aboutsummaryrefslogtreecommitdiff
path: root/src/guff/api/test.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff/api/test.cr')
-rw-r--r--src/guff/api/test.cr38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/guff/api/test.cr b/src/guff/api/test.cr
index 7549c11..44b5e10 100644
--- a/src/guff/api/test.cr
+++ b/src/guff/api/test.cr
@@ -17,6 +17,44 @@ module Guff
[{foo: "bar"}, {foo: "asdf"}].to_json
end
+ MOCK_USERS = {
+ "users": [{
+ "id": "0",
+ "name": "Guest",
+ "active": true,
+ }, {
+ "id": "1",
+ "name": "Admin",
+ "active": false,
+ }, {
+ "id": "2",
+ "name": "Test User 1",
+ "active": false,
+ }, {
+ "id": "2",
+ "name": "Test User 2",
+ "active": false,
+ }, {
+ "id": "3",
+ "name": "Test User<<<<>>>>>&&&&&&2",
+ "active": false,
+ }]
+ }
+
+ private def do_test_get_users(
+ context : HTTP::Server::Context,
+ args : Hash(String, String)
+ )
+ MOCK_USERS
+ end
+
+ private def do_test_set_user(
+ context : HTTP::Server::Context,
+ args : Hash(String, String)
+ )
+ { ok: true }
+ end
+
private def do_test_error(
context : HTTP::Server::Context,
args : Hash(String, String)