diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-11-29 13:43:58 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-12-04 17:32:33 +0100 |
commit | 10960400245ca338e32a3c55538ace976df962c6 (patch) | |
tree | a0183e5234e45cbc1ae3b4e986bea0bbb2332275 /spec/features/security | |
parent | 617f43c74b967a085f6cd7afb1408cfa28187b52 (diff) | |
download | gitlab-ce-10960400245ca338e32a3c55538ace976df962c6.tar.gz |
Update effected testszj-guest-reads-public-builds
Diffstat (limited to 'spec/features/security')
-rw-r--r-- | spec/features/security/project/private_access_spec.rb | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index a942a1ace3b..f52e23f9433 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe "Private Project Access", feature: true do include AccessMatchers - let(:project) { create(:project, :private) } + let(:project) { create(:project, :private, public_builds: false) } describe "Project should be private" do describe '#private?' do @@ -262,16 +262,15 @@ describe "Private Project Access", feature: true do it { is_expected.to be_denied_for(:visitor) } context 'when public builds is enabled' do - it { is_expected.to be_allowed_for guest } - end - - context 'when public buils are disabled' do before do - project.public_builds = false - project.save + project.update(public_builds: true) end - it { is_expected.to be_denied_for guest } + it { is_expected.to be_allowed_for(:guest).of(project) } + end + + context 'when public buils are disabled' do + it { is_expected.to be_denied_for(:guest).of(project) } end end @@ -290,16 +289,15 @@ describe "Private Project Access", feature: true do it { is_expected.to be_denied_for(:visitor) } context 'when public builds is enabled' do - it { is_expected.to be_allowed_for guest } - end - - context 'when public buils are disabled' do before do - project.public_builds = false - project.save + project.update(public_builds: true) end - it { is_expected.to be_denied_for guest } + it { is_expected.to be_allowed_for(:guest).of(project) } + end + + context 'when public buils are disabled' do + it { is_expected.to be_denied_for(:guest).of(project) } end end @@ -317,16 +315,15 @@ describe "Private Project Access", feature: true do it { is_expected.to be_denied_for(:visitor) } context 'when public builds is enabled' do - it { is_expected.to be_allowed_for guest } - end - - context 'when public buils are disabled' do before do - project.public_builds = false - project.save + project.update(public_builds: true) end - it { is_expected.to be_denied_for guest } + it { is_expected.to be_allowed_for(:guest).of(project) } + end + + context 'when public buils are disabled' do + it { is_expected.to be_denied_for(:guest).of(project) } end end @@ -346,7 +343,11 @@ describe "Private Project Access", feature: true do it { is_expected.to be_denied_for(:visitor) } context 'when public builds is enabled' do - it { is_expected.to be_allowed_for guest } + before do + project.update(public_builds: true) + end + + it { is_expected.to be_allowed_for(:guest).of(project) } end context 'when public buils are disabled' do @@ -355,7 +356,7 @@ describe "Private Project Access", feature: true do project.save end - it { is_expected.to be_denied_for guest } + it { is_expected.to be_denied_for(:guest).of(project) } end end |