UNPKG

redis-smq-rest-api

Version:
18 lines 904 B
import supertest from 'supertest'; import { describe, expect, it } from 'vitest'; import { config } from '../../../../tests/common/config.js'; import { createFanOutExchange } from '../../../../tests/common/create-fan-out-exchange.js'; import { createQueue } from '../../../../tests/common/create-queue.js'; describe('bindQueueController', () => { it('HTTP 204 No Content', async () => { const exchange = await createFanOutExchange('my-fan-out'); const { queue } = await createQueue({ ns: 'ns1', name: 'q1' }); const request = supertest(`http://127.0.0.1:${config.apiServer?.port}`); const response1 = await request .put(`/api/v1/exchanges/fan-out-exchanges/${exchange}`) .send({ queue }); expect(response1.status).toEqual(204); expect(response1.body).toEqual({}); }); }); //# sourceMappingURL=bindQueueController.test.js.map