diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-26 14:52:17 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-26 14:52:17 +0300 |
commit | 0a2a34a4d18d0489f7db6aad5b5518b503692b5b (patch) | |
tree | f169695667def43200565907636fae145469385d /spec/features | |
parent | 65b9768ccfbdc3de682d66430601cf3af1b2a2f8 (diff) | |
download | gitlab-ce-0a2a34a4d18d0489f7db6aad5b5518b503692b5b.tar.gz |
Ignore owner_id for Group in tests
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/security/group_access_spec.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/features/security/group_access_spec.rb b/spec/features/security/group_access_spec.rb index b6167174f20..dea957962a8 100644 --- a/spec/features/security/group_access_spec.rb +++ b/spec/features/security/group_access_spec.rb @@ -10,11 +10,13 @@ describe "Group access" do describe "Group" do let(:group) { create(:group) } + let(:owner) { create(:owner) } let(:master) { create(:user) } let(:reporter) { create(:user) } let(:guest) { create(:user) } before do + group.add_user(owner, Gitlab::Access::OWNER) group.add_user(master, Gitlab::Access::MASTER) group.add_user(reporter, Gitlab::Access::REPORTER) group.add_user(guest, Gitlab::Access::GUEST) @@ -23,7 +25,7 @@ describe "Group access" do describe "GET /groups/:path" do subject { group_path(group) } - it { should be_allowed_for group.owner } + it { should be_allowed_for owner } it { should be_allowed_for master } it { should be_allowed_for reporter } it { should be_allowed_for :admin } @@ -35,7 +37,7 @@ describe "Group access" do describe "GET /groups/:path/issues" do subject { issues_group_path(group) } - it { should be_allowed_for group.owner } + it { should be_allowed_for owner } it { should be_allowed_for master } it { should be_allowed_for reporter } it { should be_allowed_for :admin } @@ -47,7 +49,7 @@ describe "Group access" do describe "GET /groups/:path/merge_requests" do subject { merge_requests_group_path(group) } - it { should be_allowed_for group.owner } + it { should be_allowed_for owner } it { should be_allowed_for master } it { should be_allowed_for reporter } it { should be_allowed_for :admin } @@ -59,7 +61,7 @@ describe "Group access" do describe "GET /groups/:path/members" do subject { members_group_path(group) } - it { should be_allowed_for group.owner } + it { should be_allowed_for owner } it { should be_allowed_for master } it { should be_allowed_for reporter } it { should be_allowed_for :admin } @@ -71,7 +73,7 @@ describe "Group access" do describe "GET /groups/:path/edit" do subject { edit_group_path(group) } - it { should be_allowed_for group.owner } + it { should be_allowed_for owner } it { should be_denied_for master } it { should be_denied_for reporter } it { should be_allowed_for :admin } |