From f7ca46b5a3bf4e74f432de8a4adfd2ebbb2e3bc5 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 25 Feb 2014 17:14:03 +0200 Subject: [PATCH] Dont test models methods in security specs Signed-off-by: Dmitriy Zaporozhets --- spec/features/security/group/group_access_spec.rb | 5 ----- spec/features/security/group/internal_group_access_spec.rb | 7 +------ spec/features/security/group/mixed_group_access_spec.rb | 5 ----- spec/features/security/group/public_group_access_spec.rb | 7 +------ 4 files changed, 2 insertions(+), 22 deletions(-) diff --git a/spec/features/security/group/group_access_spec.rb b/spec/features/security/group/group_access_spec.rb index 7ef372c9199..c262d76ab54 100644 --- a/spec/features/security/group/group_access_spec.rb +++ b/spec/features/security/group/group_access_spec.rb @@ -22,11 +22,6 @@ describe "Group access" do group.add_user(reporter, Gitlab::Access::REPORTER) group.add_user(guest, Gitlab::Access::GUEST) end - - describe "Group should not have accessible projects" do - it { group.has_projects_accessible_to?(nil).should be_false } - it { group.has_projects_accessible_to?(nonmember).should be_false } - end describe "GET /groups/:path" do subject { group_path(group) } diff --git a/spec/features/security/group/internal_group_access_spec.rb b/spec/features/security/group/internal_group_access_spec.rb index 26b05b667a9..0c354f02456 100644 --- a/spec/features/security/group/internal_group_access_spec.rb +++ b/spec/features/security/group/internal_group_access_spec.rb @@ -15,14 +15,9 @@ describe "Group with internal project access" do group.add_user(master, Gitlab::Access::MASTER) group.add_user(reporter, Gitlab::Access::REPORTER) group.add_user(guest, Gitlab::Access::GUEST) - + create(:project, group: group, visibility_level: Gitlab::VisibilityLevel::INTERNAL) end - - describe "Group should have accessible projects for users" do - it { group.has_projects_accessible_to?(nil).should be_false } - it { group.has_projects_accessible_to?(nonmember).should be_true } - end describe "GET /groups/:path" do subject { group_path(group) } diff --git a/spec/features/security/group/mixed_group_access_spec.rb b/spec/features/security/group/mixed_group_access_spec.rb index 9cae49157a4..82e816e388a 100644 --- a/spec/features/security/group/mixed_group_access_spec.rb +++ b/spec/features/security/group/mixed_group_access_spec.rb @@ -19,11 +19,6 @@ describe "Group access" do create(:project, path: "internal_project", group: group, visibility_level: Gitlab::VisibilityLevel::INTERNAL) create(:project, path: "public_project", group: group, visibility_level: Gitlab::VisibilityLevel::PUBLIC) end - - describe "Group should have accessible projects" do - it { group.has_projects_accessible_to?(nil).should be_true } - it { group.has_projects_accessible_to?(nonmember).should be_true } - end describe "GET /groups/:path" do subject { group_path(group) } diff --git a/spec/features/security/group/public_group_access_spec.rb b/spec/features/security/group/public_group_access_spec.rb index d64be437b7a..a9c0afbb60f 100644 --- a/spec/features/security/group/public_group_access_spec.rb +++ b/spec/features/security/group/public_group_access_spec.rb @@ -15,13 +15,8 @@ describe "Group with public project access" do group.add_user(master, Gitlab::Access::MASTER) group.add_user(reporter, Gitlab::Access::REPORTER) group.add_user(guest, Gitlab::Access::GUEST) - - create(:project, group: group, visibility_level: Gitlab::VisibilityLevel::PUBLIC) - end - describe "Group should have accessible projects" do - it { group.has_projects_accessible_to?(nil).should be_true } - it { group.has_projects_accessible_to?(nonmember).should be_true } + create(:project, group: group, visibility_level: Gitlab::VisibilityLevel::PUBLIC) end describe "GET /groups/:path" do