Commit f7ca46b5a3bf4e74f432de8a4adfd2ebbb2e3bc5
1 parent
63044284
Exists in
spb-stable
and in
3 other branches
Dont test models methods in security specs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
4 changed files
with
2 additions
and
22 deletions
Show diff stats
spec/features/security/group/group_access_spec.rb
@@ -22,11 +22,6 @@ describe "Group access" do | @@ -22,11 +22,6 @@ describe "Group access" do | ||
22 | group.add_user(reporter, Gitlab::Access::REPORTER) | 22 | group.add_user(reporter, Gitlab::Access::REPORTER) |
23 | group.add_user(guest, Gitlab::Access::GUEST) | 23 | group.add_user(guest, Gitlab::Access::GUEST) |
24 | end | 24 | end |
25 | - | ||
26 | - describe "Group should not have accessible projects" do | ||
27 | - it { group.has_projects_accessible_to?(nil).should be_false } | ||
28 | - it { group.has_projects_accessible_to?(nonmember).should be_false } | ||
29 | - end | ||
30 | 25 | ||
31 | describe "GET /groups/:path" do | 26 | describe "GET /groups/:path" do |
32 | subject { group_path(group) } | 27 | subject { group_path(group) } |
spec/features/security/group/internal_group_access_spec.rb
@@ -15,14 +15,9 @@ describe "Group with internal project access" do | @@ -15,14 +15,9 @@ describe "Group with internal project access" do | ||
15 | group.add_user(master, Gitlab::Access::MASTER) | 15 | group.add_user(master, Gitlab::Access::MASTER) |
16 | group.add_user(reporter, Gitlab::Access::REPORTER) | 16 | group.add_user(reporter, Gitlab::Access::REPORTER) |
17 | group.add_user(guest, Gitlab::Access::GUEST) | 17 | group.add_user(guest, Gitlab::Access::GUEST) |
18 | - | 18 | + |
19 | create(:project, group: group, visibility_level: Gitlab::VisibilityLevel::INTERNAL) | 19 | create(:project, group: group, visibility_level: Gitlab::VisibilityLevel::INTERNAL) |
20 | end | 20 | end |
21 | - | ||
22 | - describe "Group should have accessible projects for users" do | ||
23 | - it { group.has_projects_accessible_to?(nil).should be_false } | ||
24 | - it { group.has_projects_accessible_to?(nonmember).should be_true } | ||
25 | - end | ||
26 | 21 | ||
27 | describe "GET /groups/:path" do | 22 | describe "GET /groups/:path" do |
28 | subject { group_path(group) } | 23 | subject { group_path(group) } |
spec/features/security/group/mixed_group_access_spec.rb
@@ -19,11 +19,6 @@ describe "Group access" do | @@ -19,11 +19,6 @@ describe "Group access" do | ||
19 | create(:project, path: "internal_project", group: group, visibility_level: Gitlab::VisibilityLevel::INTERNAL) | 19 | create(:project, path: "internal_project", group: group, visibility_level: Gitlab::VisibilityLevel::INTERNAL) |
20 | create(:project, path: "public_project", group: group, visibility_level: Gitlab::VisibilityLevel::PUBLIC) | 20 | create(:project, path: "public_project", group: group, visibility_level: Gitlab::VisibilityLevel::PUBLIC) |
21 | end | 21 | end |
22 | - | ||
23 | - describe "Group should have accessible projects" do | ||
24 | - it { group.has_projects_accessible_to?(nil).should be_true } | ||
25 | - it { group.has_projects_accessible_to?(nonmember).should be_true } | ||
26 | - end | ||
27 | 22 | ||
28 | describe "GET /groups/:path" do | 23 | describe "GET /groups/:path" do |
29 | subject { group_path(group) } | 24 | subject { group_path(group) } |
spec/features/security/group/public_group_access_spec.rb
@@ -15,13 +15,8 @@ describe "Group with public project access" do | @@ -15,13 +15,8 @@ describe "Group with public project access" do | ||
15 | group.add_user(master, Gitlab::Access::MASTER) | 15 | group.add_user(master, Gitlab::Access::MASTER) |
16 | group.add_user(reporter, Gitlab::Access::REPORTER) | 16 | group.add_user(reporter, Gitlab::Access::REPORTER) |
17 | group.add_user(guest, Gitlab::Access::GUEST) | 17 | group.add_user(guest, Gitlab::Access::GUEST) |
18 | - | ||
19 | - create(:project, group: group, visibility_level: Gitlab::VisibilityLevel::PUBLIC) | ||
20 | - end | ||
21 | 18 | ||
22 | - describe "Group should have accessible projects" do | ||
23 | - it { group.has_projects_accessible_to?(nil).should be_true } | ||
24 | - it { group.has_projects_accessible_to?(nonmember).should be_true } | 19 | + create(:project, group: group, visibility_level: Gitlab::VisibilityLevel::PUBLIC) |
25 | end | 20 | end |
26 | 21 | ||
27 | describe "GET /groups/:path" do | 22 | describe "GET /groups/:path" do |