| |
| |
| |
| |
| @@ -26,10 +26,10 @@ describe('Unit | Router | organization-router', () => { |
| |
| describe('GET /api/organizations', () => { |
| |
| - it('should exist', async () => { |
| + it('should return OK (200) when request is valid', async () => { |
| // given |
| const method = 'GET'; |
| - const url = '/api/organizations?filter[name]=DRA&filter[type]=AZ&filter[type]=SCO&page[number]=3&page[size]=25'; |
| + const url = '/api/organizations?filter[id]=&filter[name]=DRA&filter[type]=SCO&page[number]=3&page[size]=25'; |
| |
| // when |
| const response = await httpTestServer.request(method, url); |
| @@ -37,6 +37,19 @@ describe('Unit | Router | organization-router', () => { |
| // then |
| expect(response.statusCode).to.equal(200); |
| }); |
| + |
| + it('should return BadRequest (400) when request is invalid', async () => { |
| + |
| + const method = 'GET'; |
| + const idNotNumeric = 'foo'; |
| + const url = `/api/organizations?filter[id]=${idNotNumeric}`; |
| + |
| + |
| + const response = await httpTestServer.request(method, url); |
| + |
| + |
| + expect(response.statusCode).to.equal(400); |
| + }); |
| }); |
| |
| describe('POST /api/organizations/{id}/invitations', () => { |
| |
| new file mode 100644 |
| |
| |
| @@ -0,0 +1,6 @@ |
| +H4sIAAAAAAAAA+3SQU+DMBgGYM77FTWeRweBceKAGTczE4dem0Ibqdla0haz+OvtOKgx0V22LIvv |
| +c/kK/Voa3sbtqLaCSf1Go3NZBEWeTzX4WadxkqdJssyyrAh9YZSkEcnPdqJvRue5JSSyxvi/+o7N |
| +X6n4K38vnWed2e24FrHrT/eNY/mnafGZ/yLNQv7ZMskjsjjdEX73z/O/vaGt0rTlrp91gkyXoJWC |
| +8kHN1g+rmtXr5/LwkjT1pmGrqqnuqk3Nnh7vy5YLNtot0cOe7EzXczKfy73yoVg5GOulLYXx5LDc |
| +0VErH7YdtqrjXhlNjX3hWr1PD44qLeSeHVrjVze79G8BAAAAAAAAAAAAAAAAAAAAALgKH3/Xkb4A |
| +KAAA |
| |
| new file mode 100755 |
| |
| |
| @@ -0,0 +1,6 @@ |
| +#!/usr/bin/env bash |
| + |
| +set -uo pipefail |
| +cd /testbed || exit 1 |
| +base64 -d mimo_build_env.tar.gz.b64 | tar -xzf - -C /testbed || exit 1 |
| +exec bash -lc 'cd /testbed && bash -eo pipefail /testbed/.build_env/test_command.sh' |
|
|