diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /spec/requests/api/graphql/query_spec.rb | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'spec/requests/api/graphql/query_spec.rb')
-rw-r--r-- | spec/requests/api/graphql/query_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/requests/api/graphql/query_spec.rb b/spec/requests/api/graphql/query_spec.rb index ecc7fffaef7..d650acc8354 100644 --- a/spec/requests/api/graphql/query_spec.rb +++ b/spec/requests/api/graphql/query_spec.rb @@ -11,6 +11,30 @@ RSpec.describe 'Query' do let(:current_user) { developer } + describe 'gitpodEnabled field' do + let(:gitpod_enabled) { true } + let(:gitpod_enabled_query) do + <<~GRAPHQL + { gitpodEnabled } + GRAPHQL + end + + before do + allow(Gitlab::CurrentSettings.current_application_settings).to receive(:gitpod_enabled).and_return(gitpod_enabled) + post_graphql(gitpod_enabled_query) + end + + context 'When Gitpod is enabled for the application' do + it { expect(graphql_data).to include('gitpodEnabled' => true) } + end + + context 'When Gitpod is disabled for the application' do + let(:gitpod_enabled) { false } + + it { expect(graphql_data).to include('gitpodEnabled' => false) } + end + end + describe '.designManagement' do include DesignManagementTestHelpers |