debian-mirror-gitlab/spec/routing/api_routing_spec.rb
2019-07-07 11:18:12 +05:30

23 lines
523 B
Ruby

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