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
Tatuya Kamada
gitlab-ce
Commits
80212617
Commit
80212617
authored
Mar 27, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add controller specs for environment folder action
parent
39f834b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
spec/controllers/projects/environments_controller_spec.rb
spec/controllers/projects/environments_controller_spec.rb
+33
-0
No files found.
spec/controllers/projects/environments_controller_spec.rb
View file @
80212617
...
@@ -81,6 +81,39 @@ describe Projects::EnvironmentsController do
...
@@ -81,6 +81,39 @@ describe Projects::EnvironmentsController do
end
end
end
end
describe
'GET folder'
do
before
do
create
(
:environment
,
project:
project
,
name:
'staging-1.0/review'
,
state: :available
)
end
context
'when using default format'
do
it
'responds with HTML'
do
get
:folder
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
'staging-1.0'
expect
(
response
).
to
be_ok
expect
(
response
).
to
render_template
'folder'
end
end
context
'when using JSON format'
do
it
'responds with JSON'
do
get
:folder
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
'staging-1.0'
,
format: :json
expect
(
response
).
to
be_ok
expect
(
response
).
not_to
render_template
'folder'
expect
(
json_response
[
'environments'
][
0
])
.
to
include
(
'name'
=>
'staging-1.0/review'
)
end
end
end
describe
'GET show'
do
describe
'GET show'
do
context
'with valid id'
do
context
'with valid id'
do
it
'responds with a status code 200'
do
it
'responds with a status code 200'
do
...
...
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