diff options
author | Nick Thomas <nick@gitlab.com> | 2016-11-11 15:51:50 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-11-11 18:45:47 +0300 |
commit | d211011698016bd4f04bc32e7450d6df470ea0c2 (patch) | |
tree | bf6a1309c933dbff7c1c16ee3ee6ee199d8bffbd /spec/finders/access_requests_finder_spec.rb | |
parent | 64d2eff9ccf716395d101f2ac91db44c47d7394e (diff) |
Make access request specs explicitly enable or disable access requests as required
Diffstat (limited to 'spec/finders/access_requests_finder_spec.rb')
-rw-r--r-- | spec/finders/access_requests_finder_spec.rb | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/spec/finders/access_requests_finder_spec.rb b/spec/finders/access_requests_finder_spec.rb index 8cfea9659cb..c7278e971ae 100644 --- a/spec/finders/access_requests_finder_spec.rb +++ b/spec/finders/access_requests_finder_spec.rb @@ -3,12 +3,17 @@ require 'spec_helper' describe AccessRequestsFinder, services: true do let(:user) { create(:user) } let(:access_requester) { create(:user) } - let(:project) { create(:project, :public) } - let(:group) { create(:group, :public) } - before do - project.request_access(access_requester) - group.request_access(access_requester) + let(:project) do + create(:empty_project, :public, :access_requestable) do |project| + project.request_access(access_requester) + end + end + + let(:group) do + create(:group, :public, :access_requestable) do |group| + group.request_access(access_requester) + end end shared_examples 'a finder returning access requesters' do |method_name| |