diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 21:09:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-09 21:09:34 +0300 |
commit | 141902c04943d5fb43c014b8cf42af60a3bc0cdf (patch) | |
tree | 7e5a31fe9b0434fa0071cb5d09273669c3a8acab /spec/models/project_group_link_spec.rb | |
parent | 209bd8cf1f542f6ba2a069b368a9187faa871e96 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/project_group_link_spec.rb')
-rw-r--r-- | spec/models/project_group_link_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/models/project_group_link_spec.rb b/spec/models/project_group_link_spec.rb index 63ce08c4d30..9c51180b55b 100644 --- a/spec/models/project_group_link_spec.rb +++ b/spec/models/project_group_link_spec.rb @@ -32,6 +32,23 @@ describe ProjectGroupLink do end end + describe 'scopes' do + describe '.non_guests' do + let!(:project_group_link_reporter) { create :project_group_link, :reporter } + let!(:project_group_link_maintainer) { create :project_group_link, :maintainer } + let!(:project_group_link_developer) { create :project_group_link } + let!(:project_group_link_guest) { create :project_group_link, :guest } + + it 'returns all records which are greater than Guests access' do + expect(described_class.non_guests).to match_array([ + project_group_link_reporter, + project_group_link_developer, + project_group_link_maintainer + ]) + end + end + end + describe "destroying a record", :delete do it "refreshes group users' authorized projects" do project = create(:project, :private) |