mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	This allows the users of 'unleash-server' to programatically change the logger implemnentation. #175
		
			
				
	
	
		
			25 lines
		
	
	
		
			669 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			669 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict';
 | |
| 
 | |
| const { test } = require('ava');
 | |
| const { setupApp } = require('./../../helpers/test-helper');
 | |
| 
 | |
| test.serial('returns events', async t => {
 | |
|     t.plan(0);
 | |
|     const { request, destroy } = await setupApp('event_api_serial');
 | |
|     return request
 | |
|         .get('/api/admin/events')
 | |
|         .expect('Content-Type', /json/)
 | |
|         .expect(200)
 | |
|         .then(destroy);
 | |
| });
 | |
| 
 | |
| test.serial('returns events given a name', async t => {
 | |
|     t.plan(0);
 | |
|     const { request, destroy } = await setupApp('event_api_serial');
 | |
|     return request
 | |
|         .get('/api/admin/events/myname')
 | |
|         .expect('Content-Type', /json/)
 | |
|         .expect(200)
 | |
|         .then(destroy);
 | |
| });
 |