Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
a481c54c
Commit
a481c54c
authored
Mar 15, 2019
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec for routes to the GraphqlController
parent
297ce3e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
spec/routing/api_routing_spec.rb
spec/routing/api_routing_spec.rb
+3
-11
No files found.
spec/routing/api_routing_spec.rb
View file @
a481c54c
...
...
@@ -7,25 +7,17 @@ describe 'api', 'routing' do
end
it
'does not route to the GraphqlController'
do
expect
(
get
(
'/api/graphql'
)).
not_to
route_to
(
'graphql#execute'
)
end
it
'does not expose graphiql'
do
expect
(
get
(
'/-/graphql-explorer'
)).
not_to
route_to
(
'graphiql/rails/editors#show'
)
expect
(
post
(
'/api/graphql'
)).
not_to
route_to
(
'graphql#execute'
)
end
end
context
'when graphql is
dis
abled'
do
context
'when graphql is
en
abled'
do
before
do
stub_feature_flags
(
graphql:
true
)
end
it
'routes to the GraphqlController'
do
expect
(
get
(
'/api/graphql'
)).
not_to
route_to
(
'graphql#execute'
)
end
it
'exposes graphiql'
do
expect
(
get
(
'/-/graphql-explorer'
)).
not_to
route_to
(
'graphiql/rails/editors#show'
)
expect
(
post
(
'/api/graphql'
)).
to
route_to
(
'graphql#execute'
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment