diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-05 00:08:41 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-05 00:08:41 +0000 |
commit | e40710ab8a30f36d7c82d7d6497033291840eec9 (patch) | |
tree | aea450b24cb1bd8023c1d297e4f01de4e88926b2 /spec/features | |
parent | 51612d3ef5be853289008694c40973b479e8547c (diff) | |
download | gitlab-ce-e40710ab8a30f36d7c82d7d6497033291840eec9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/graphiql_spec.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/spec/features/graphiql_spec.rb b/spec/features/graphiql_spec.rb new file mode 100644 index 00000000000..329758113ab --- /dev/null +++ b/spec/features/graphiql_spec.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'GraphiQL' do + context 'without relative_url_root' do + before do + visit '/-/graphql-explorer' + end + + it 'has the correct graphQLEndpoint' do + expect(page.body).to include('var graphQLEndpoint = "/api/graphql";') + end + end + + context 'with relative_url_root' do + before do + stub_config_setting(relative_url_root: '/gitlab/root') + Rails.application.reload_routes! + + visit '/-/graphql-explorer' + end + + after do + Rails.application.reload_routes! + end + + it 'has the correct graphQLEndpoint' do + expect(page.body).to include('var graphQLEndpoint = "/gitlab/root/api/graphql";') + end + end +end |