blob: 3c48ead4ff2d015d7caed93b8e88b28300338d17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
require 'spec_helper'
describe 'api', 'routing' do
context 'when graphql is disabled' do
before do
stub_feature_flags(graphql: false)
end
it 'does not route to the GraphqlController' do
expect(post('/api/graphql')).not_to route_to('graphql#execute')
end
end
context 'when graphql is enabled' do
before do
stub_feature_flags(graphql: true)
end
it 'routes to the GraphqlController' do
expect(post('/api/graphql')).to route_to('graphql#execute')
end
end
end
|