@@ -21,4 +21,23 @@ describe('GET /api/runners/me invalid should return fail', () => {
 | 
			
		||||
        expect(res.headers['content-type']).toContain("application/json");
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
// ---------------
 | 
			
		||||
// ---------------
 | 
			
		||||
describe('register + get should return 200', () => {
 | 
			
		||||
    let added_runner;
 | 
			
		||||
    it('registering as citizen should return 200', async () => {
 | 
			
		||||
        const res = await axios.post(base + '/api/runners/register', {
 | 
			
		||||
            "firstname": "string",
 | 
			
		||||
            "middlename": "string",
 | 
			
		||||
            "lastname": "string",
 | 
			
		||||
            "email": "user@example.com"
 | 
			
		||||
        }, axios_config);
 | 
			
		||||
        expect(res.status).toEqual(200);
 | 
			
		||||
        expect(res.headers['content-type']).toContain("application/json");
 | 
			
		||||
        added_runner = res.data;
 | 
			
		||||
    });
 | 
			
		||||
    it('get with valid jwt should return 200', async () => {
 | 
			
		||||
        const res = await axios.get(base + '/api/runners/me/' + added_runner.token, axios_config);
 | 
			
		||||
        expect(res.status).toEqual(200);
 | 
			
		||||
        expect(res.headers['content-type']).toContain("application/json");
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user