Speed up request specs a bit
This commit is contained in:
parent
f8c02f6e39
commit
7df25e77ac
2 changed files with 12 additions and 4 deletions
|
@ -51,7 +51,7 @@ describe "Application access" do
|
|||
end
|
||||
|
||||
describe "GET /project_code/commits/master" do
|
||||
subject { project_commits_path(project, project.root_ref) }
|
||||
subject { project_commits_path(project, project.root_ref, limit: 1) }
|
||||
|
||||
it { should be_allowed_for master }
|
||||
it { should be_allowed_for reporter }
|
||||
|
@ -189,6 +189,11 @@ describe "Application access" do
|
|||
describe "GET /project_code/repository/branches" do
|
||||
subject { branches_project_repository_path(project) }
|
||||
|
||||
before do
|
||||
# Speed increase
|
||||
Project.any_instance.stub(:branches).and_return([])
|
||||
end
|
||||
|
||||
it { should be_allowed_for master }
|
||||
it { should be_allowed_for reporter }
|
||||
it { should be_denied_for :admin }
|
||||
|
@ -200,6 +205,11 @@ describe "Application access" do
|
|||
describe "GET /project_code/repository/tags" do
|
||||
subject { tags_project_repository_path(project) }
|
||||
|
||||
before do
|
||||
# Speed increase
|
||||
Project.any_instance.stub(:tags).and_return([])
|
||||
end
|
||||
|
||||
it { should be_allowed_for master }
|
||||
it { should be_allowed_for reporter }
|
||||
it { should be_denied_for :admin }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue