Commit f7ca46b5a3bf4e74f432de8a4adfd2ebbb2e3bc5

Authored by Dmitriy Zaporozhets
1 parent 63044284

Dont test models methods in security specs

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
spec/features/security/group/group_access_spec.rb
... ... @@ -22,11 +22,6 @@ describe &quot;Group access&quot; do
22 22 group.add_user(reporter, Gitlab::Access::REPORTER)
23 23 group.add_user(guest, Gitlab::Access::GUEST)
24 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 26 describe "GET /groups/:path" do
32 27 subject { group_path(group) }
... ...
spec/features/security/group/internal_group_access_spec.rb
... ... @@ -15,14 +15,9 @@ describe &quot;Group with internal project access&quot; do
15 15 group.add_user(master, Gitlab::Access::MASTER)
16 16 group.add_user(reporter, Gitlab::Access::REPORTER)
17 17 group.add_user(guest, Gitlab::Access::GUEST)
18   -
  18 +
19 19 create(:project, group: group, visibility_level: Gitlab::VisibilityLevel::INTERNAL)
20 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 22 describe "GET /groups/:path" do
28 23 subject { group_path(group) }
... ...
spec/features/security/group/mixed_group_access_spec.rb
... ... @@ -19,11 +19,6 @@ describe &quot;Group access&quot; do
19 19 create(:project, path: "internal_project", group: group, visibility_level: Gitlab::VisibilityLevel::INTERNAL)
20 20 create(:project, path: "public_project", group: group, visibility_level: Gitlab::VisibilityLevel::PUBLIC)
21 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 23 describe "GET /groups/:path" do
29 24 subject { group_path(group) }
... ...
spec/features/security/group/public_group_access_spec.rb
... ... @@ -15,13 +15,8 @@ describe &quot;Group with public project access&quot; do
15 15 group.add_user(master, Gitlab::Access::MASTER)
16 16 group.add_user(reporter, Gitlab::Access::REPORTER)
17 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 20 end
26 21  
27 22 describe "GET /groups/:path" do
... ...