Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab FOSS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab FOSS
Commits
80212617
There was a problem fetching the pipeline summary.
Commit
80212617
authored
7 years ago
by
Grzegorz Bizon
Browse files
Options
Downloads
Patches
Plain Diff
Add controller specs for environment folder action
parent
39f834b6
No related branches found
No related tags found
Loading
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
spec/controllers/projects/environments_controller_spec.rb
+33
-0
33 additions, 0 deletions
spec/controllers/projects/environments_controller_spec.rb
with
33 additions
and
0 deletions
spec/controllers/projects/environments_controller_spec.rb
+
33
−
0
View file @
80212617
...
...
@@ -81,6 +81,39 @@
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
context
'with valid id'
do
it
'responds with a status code 200'
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment