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

services_shared_examples.rb « projects « graphql « api « requests « shared_examples « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: da1caef63ba013127e95514ebce699ebd70a6bc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

RSpec.shared_examples 'unauthorized users cannot read services' do
  before do
    post_graphql(query, current_user: current_user)
  end

  context 'when anonymous user' do
    let(:current_user) { nil }

    it { expect(services).to be nil }
  end

  context 'when user developer' do
    before do
      project.add_developer(current_user)
    end

    it { expect(services).to be nil }
  end
end