BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
bfd9bbba
Commit
bfd9bbba
authored
Feb 02, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added specs for merge request environment list
Ported from
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1154
parent
7dc8b6b2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
widget_spec.rb
spec/features/merge_requests/widget_spec.rb
+23
-0
No files found.
spec/features/merge_requests/widget_spec.rb
View file @
bfd9bbba
...
...
@@ -5,11 +5,15 @@ describe 'Merge request', :feature, :js do
let
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
before
do
project
.
team
<<
[
user
,
:master
]
login_as
(
user
)
end
context
'new merge request'
do
before
do
visit
new_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
...
...
@@ -31,4 +35,23 @@ describe 'Merge request', :feature, :js do
expect
(
page
).
to
have_selector
(
'.accept_merge_request'
)
end
end
context
'view merge request'
do
let!
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let!
(
:deployment
)
{
create
(
:deployment
,
environment:
environment
,
ref:
'feature'
,
sha:
merge_request
.
diff_head_sha
)
}
before
do
visit
namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
end
it
'shows environments link'
do
wait_for_ajax
page
.
within
(
'.mr-widget-heading'
)
do
expect
(
page
).
to
have_content
(
"Deployed to
#{
environment
.
name
}
"
)
expect
(
find
(
'.js-environment-link'
)[
:href
]).
to
include
(
environment
.
formatted_external_url
)
end
end
end
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