diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-17 19:42:46 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-03-17 19:42:46 -0300 |
commit | 0a7f7161198feaa9a4cae7c16669a0e6187aed33 (patch) | |
tree | 445dcbd9f473be2af293a299b634525725a70666 /spec/features/security | |
parent | a18ac62756573a2da2c42ca50b6f30033be6fa63 (diff) | |
download | gitlab-ce-0a7f7161198feaa9a4cae7c16669a0e6187aed33.tar.gz |
Code fixes
Diffstat (limited to 'spec/features/security')
-rw-r--r-- | spec/features/security/group/internal_access_spec.rb | 21 | ||||
-rw-r--r-- | spec/features/security/group/private_access_spec.rb | 30 | ||||
-rw-r--r-- | spec/features/security/group/public_access_spec.rb | 10 |
3 files changed, 46 insertions, 15 deletions
diff --git a/spec/features/security/group/internal_access_spec.rb b/spec/features/security/group/internal_access_spec.rb index 4e781c23ee0..e44d4c32921 100644 --- a/spec/features/security/group/internal_access_spec.rb +++ b/spec/features/security/group/internal_access_spec.rb @@ -12,9 +12,12 @@ describe 'Internal group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } + end context "when user in group project" do @@ -31,9 +34,11 @@ describe 'Internal group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } end context "when user in group project" do @@ -50,9 +55,11 @@ describe 'Internal group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } end context "when user in group project" do @@ -70,9 +77,11 @@ describe 'Internal group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } end context "when user in group project" do @@ -89,9 +98,11 @@ describe 'Internal group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } end context "when user in group project" do diff --git a/spec/features/security/group/private_access_spec.rb b/spec/features/security/group/private_access_spec.rb index 0d01310b449..8d8c61a618f 100644 --- a/spec/features/security/group/private_access_spec.rb +++ b/spec/features/security/group/private_access_spec.rb @@ -14,9 +14,11 @@ describe 'Private group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } - it { is_expected.to_not be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :user } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } end context "when user in group project" do @@ -33,9 +35,11 @@ describe 'Private group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } - it { is_expected.to_not be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :user } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } end context "when user in group project" do @@ -52,9 +56,11 @@ describe 'Private group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } - it { is_expected.to_not be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :user } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } end context "when user in group project" do @@ -72,9 +78,11 @@ describe 'Private group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } - it { is_expected.to_not be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :user } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } end context "when user in group project" do @@ -91,9 +99,11 @@ describe 'Private group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } - it { is_expected.to_not be_allowed_for :user } - it { is_expected.to_not be_allowed_for :visitor } + it { is_expected.to be_denied_for :user } + it { is_expected.to be_denied_for :visitor } + it { is_expected.to be_denied_for :external } end context "when user in group project" do diff --git a/spec/features/security/group/public_access_spec.rb b/spec/features/security/group/public_access_spec.rb index 75d208f2949..5ff982504c5 100644 --- a/spec/features/security/group/public_access_spec.rb +++ b/spec/features/security/group/public_access_spec.rb @@ -14,9 +14,11 @@ describe 'Public group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } it { is_expected.to be_allowed_for :visitor } + it { is_expected.to be_allowed_for :external } end context "when user in group project" do @@ -33,9 +35,11 @@ describe 'Public group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } it { is_expected.to be_allowed_for :visitor } + it { is_expected.to be_allowed_for :external } end context "when user in group project" do @@ -52,9 +56,11 @@ describe 'Public group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } it { is_expected.to be_allowed_for :visitor } + it { is_expected.to be_allowed_for :external } end context "when user in group project" do @@ -72,9 +78,11 @@ describe 'Public group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } it { is_expected.to be_allowed_for :visitor } + it { is_expected.to be_allowed_for :external } end context "when user in group project" do @@ -91,9 +99,11 @@ describe 'Public group access', feature: true do it { is_expected.to be_allowed_for group_member(:master) } it { is_expected.to be_allowed_for group_member(:reporter) } it { is_expected.to be_allowed_for group_member(:guest) } + it { is_expected.to be_allowed_for external_guest } it { is_expected.to be_allowed_for :admin } it { is_expected.to be_allowed_for :user } it { is_expected.to be_allowed_for :visitor } + it { is_expected.to be_allowed_for :external } end context "when user in group project" do |