Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
7df25e77
Commit
7df25e77
authored
Sep 26, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed up request specs a bit
parent
f8c02f6e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
spec/requests/gitlab_flavored_markdown_spec.rb
spec/requests/gitlab_flavored_markdown_spec.rb
+1
-3
spec/requests/security/project_access_spec.rb
spec/requests/security/project_access_spec.rb
+11
-1
No files found.
spec/requests/gitlab_flavored_markdown_spec.rb
View file @
7df25e77
...
...
@@ -40,10 +40,9 @@ describe "Gitlab Flavored Markdown" do
project
.
add_access
(
@user
,
:read
,
:write
)
end
describe
"for commits"
do
it
"should render title in commits#index"
do
visit
project_commits_path
(
project
,
@branch_name
)
visit
project_commits_path
(
project
,
@branch_name
,
limit:
1
)
page
.
should
have_link
(
"#
#{
issue
.
id
}
"
)
end
...
...
@@ -89,7 +88,6 @@ describe "Gitlab Flavored Markdown" do
end
end
describe
"for issues"
do
before
do
@other_issue
=
Factory
:issue
,
...
...
spec/requests/security/project_access_spec.rb
View file @
7df25e77
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment