debian-mirror-gitlab/spec/features/graphiql_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
789 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'GraphiQL' do
2020-03-13 15:44:24 +05:30
context 'without relative_url_root' do
before do
visit '/-/graphql-explorer'
end
it 'has the correct graphQLEndpoint' do
2022-03-02 08:16:31 +05:30
expect(page.body).to include('<div id="graphiql-container" data-graphql-endpoint-path="/api/graphql"')
2020-03-13 15:44:24 +05:30
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
2022-03-02 08:16:31 +05:30
expect(page.body).to include('<div id="graphiql-container" data-graphql-endpoint-path="/gitlab/root/api/graphql"')
2020-03-13 15:44:24 +05:30
end
end
end