summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-07-28 17:37:14 +0000
committerStan Hu <stanhu@gmail.com>2015-07-28 13:06:13 -0700
commit5bdcef7b0b6fd9cfdc3498a40d2b2b2a9ddc682c (patch)
tree8bded1a9c278b87ad0953db2fcffc6065c4911de /spec
parent02a15d616bccfbe40696153f1fb3a37e01dafae6 (diff)
downloadgitlab-ce-5bdcef7b0b6fd9cfdc3498a40d2b2b2a9ddc682c.tar.gz
Change before(:all) -> let! to avoid leaking data across tests
Closes https://github.com/gitlabhq/gitlabhq/issues/9495
Diffstat (limited to 'spec')
-rw-r--r--spec/features/security/group_access_spec.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/features/security/group_access_spec.rb b/spec/features/security/group_access_spec.rb
index 0f36e474989..8ce15388605 100644
--- a/spec/features/security/group_access_spec.rb
+++ b/spec/features/security/group_access_spec.rb
@@ -36,7 +36,7 @@ describe 'Group access', feature: true do
subject { group_path(group) }
context 'with public projects' do
- before(:all) { create_project(:public) }
+ let!(:project) { create_project(:public) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -48,7 +48,7 @@ describe 'Group access', feature: true do
end
context 'with mixed projects' do
- before(:all) { create_project(:mixed) }
+ let!(:project) { create_project(:mixed) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -60,7 +60,7 @@ describe 'Group access', feature: true do
end
context 'with internal projects' do
- before(:all) { create_project(:internal) }
+ let!(:project) { create_project(:internal) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -86,7 +86,7 @@ describe 'Group access', feature: true do
subject { issues_group_path(group) }
context 'with public projects' do
- before(:all) { create_project(:public) }
+ let!(:project) { create_project(:public) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -98,7 +98,7 @@ describe 'Group access', feature: true do
end
context 'with mixed projects' do
- before(:all) { create_project(:mixed) }
+ let!(:project) { create_project(:mixed) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -110,7 +110,7 @@ describe 'Group access', feature: true do
end
context 'with internal projects' do
- before(:all) { create_project(:internal) }
+ let!(:project) { create_project(:internal) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -136,7 +136,7 @@ describe 'Group access', feature: true do
subject { merge_requests_group_path(group) }
context 'with public projects' do
- before(:all) { create_project(:public) }
+ let!(:project) { create_project(:public) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -148,7 +148,7 @@ describe 'Group access', feature: true do
end
context 'with mixed projects' do
- before(:all) { create_project(:mixed) }
+ let!(:project) { create_project(:mixed) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -160,7 +160,7 @@ describe 'Group access', feature: true do
end
context 'with internal projects' do
- before(:all) { create_project(:internal) }
+ let!(:project) { create_project(:internal) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -186,7 +186,7 @@ describe 'Group access', feature: true do
subject { group_group_members_path(group) }
context 'with public projects' do
- before(:all) { create_project(:public) }
+ let!(:project) { create_project(:public) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -198,7 +198,7 @@ describe 'Group access', feature: true do
end
context 'with mixed projects' do
- before(:all) { create_project(:mixed) }
+ let!(:project) { create_project(:mixed) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -210,7 +210,7 @@ describe 'Group access', feature: true do
end
context 'with internal projects' do
- before(:all) { create_project(:internal) }
+ let!(:project) { create_project(:internal) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_allowed_for group_member(:master) }
@@ -236,7 +236,7 @@ describe 'Group access', feature: true do
subject { edit_group_path(group) }
context 'with public projects' do
- before(:all) { create_project(:public) }
+ let!(:project) { create_project(:public) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_denied_for group_member(:master) }
@@ -248,7 +248,7 @@ describe 'Group access', feature: true do
end
context 'with mixed projects' do
- before(:all) { create_project(:mixed) }
+ let!(:project) { create_project(:mixed) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_denied_for group_member(:master) }
@@ -260,7 +260,7 @@ describe 'Group access', feature: true do
end
context 'with internal projects' do
- before(:all) { create_project(:internal) }
+ let!(:project) { create_project(:internal) }
it { is_expected.to be_allowed_for group_member(:owner) }
it { is_expected.to be_denied_for group_member(:master) }