mirror of
https://github.com/strapi/strapi.git
synced 2025-06-27 00:41:25 +00:00

GET queries are often advantagous for caching, cdns, etc This removes a line that wasnt required, that blocked GET queries from being authenticated on /graphql
26 lines
631 B
JavaScript
26 lines
631 B
JavaScript
'use strict';
|
|
|
|
// Helpers.
|
|
const { createStrapiInstance } = require('api-tests/strapi');
|
|
const request = require('supertest');
|
|
|
|
let strapi;
|
|
|
|
describe('Test Graphql Utils', () => {
|
|
beforeAll(async () => {
|
|
strapi = await createStrapiInstance();
|
|
});
|
|
|
|
afterAll(async () => {
|
|
await strapi.destroy();
|
|
});
|
|
|
|
test('Load Graphql playground', async () => {
|
|
const supertestAgent = request.agent(strapi.server.httpServer);
|
|
const res = await supertestAgent.get('/graphql').set('accept', 'text/html');
|
|
|
|
expect(res.statusCode).toBe(200);
|
|
expect(res.text).toContain('<title>GraphQL Playground</title>');
|
|
});
|
|
});
|