Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-01-24 19:23:57 +0300
committerNick Thomas <nick@gitlab.com>2019-03-05 18:00:32 +0300
commit21779d00186d75349165d6c07dbe04aace68017c (patch)
tree25aaf112b51d6f5360a3e97db6f31f98a642660e /spec/requests/api/version_spec.rb
parent42d3117f9c3371e07e8b0aafab6f504e87251c2a (diff)
Add metadata about the GitLab server to GraphQL
Diffstat (limited to 'spec/requests/api/version_spec.rb')
-rw-r--r--spec/requests/api/version_spec.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/requests/api/version_spec.rb b/spec/requests/api/version_spec.rb
index 38b618191fb..e06f8bbc095 100644
--- a/spec/requests/api/version_spec.rb
+++ b/spec/requests/api/version_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe API::Version do
- describe 'GET /version' do
+ shared_examples_for 'GET /version' do
context 'when unauthenticated' do
it 'returns authentication error' do
get api('/version')
@@ -22,4 +22,20 @@ describe API::Version do
end
end
end
+
+ context 'with graphql enabled' do
+ before do
+ stub_feature_flags(graphql: true)
+ end
+
+ include_examples 'GET /version'
+ end
+
+ context 'with graphql disabled' do
+ before do
+ stub_feature_flags(graphql: false)
+ end
+
+ include_examples 'GET /version'
+ end
end