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
Boxiang Sun
gitlab-ce
Commits
6bff207d
Commit
6bff207d
authored
Sep 17, 2015
by
Francesco Levorato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor spec to go through ApplicationController#project
parent
69cb5fba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
spec/controllers/projects/issues_controller_spec.rb
spec/controllers/projects/issues_controller_spec.rb
+4
-4
No files found.
spec/controllers/projects/issues_controller_spec.rb
View file @
6bff207d
...
...
@@ -8,12 +8,11 @@ describe Projects::IssuesController do
before
do
sign_in
(
user
)
project
.
team
<<
[
user
,
:developer
]
controller
.
instance_variable_set
(
:@project
,
project
)
end
describe
"GET #index"
do
it
"returns index"
do
get
:index
,
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
get
:index
,
namespace_id:
project
.
namespace
.
path
,
project_id:
project
.
path
expect
(
response
.
status
).
to
eq
(
200
)
end
...
...
@@ -22,14 +21,15 @@ describe Projects::IssuesController do
project
.
issues_enabled
=
false
project
.
save
get
:index
,
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
get
:index
,
namespace_id:
project
.
namespace
.
path
,
project_id:
project
.
path
expect
(
response
.
status
).
to
eq
(
404
)
end
it
"returns 404 when external issue tracker is enabled"
do
controller
.
instance_variable_set
(
:@project
,
project
)
allow
(
project
).
to
receive
(
:default_issues_tracker?
).
and_return
(
false
)
get
:index
,
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
get
:index
,
namespace_id:
project
.
namespace
.
path
,
project_id:
project
.
path
expect
(
response
.
status
).
to
eq
(
404
)
end
...
...
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