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
f11ebb95
Commit
f11ebb95
authored
Oct 05, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a view test for showing source commits
parent
d2a9eefb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
spec/views/projects/merge_requests/_commits.html.haml_spec.rb
.../views/projects/merge_requests/_commits.html.haml_spec.rb
+38
-0
No files found.
spec/views/projects/merge_requests/_commits.html.haml_spec.rb
0 → 100644
View file @
f11ebb95
require
'spec_helper'
describe
'projects/merge_requests/show/_commits.html.haml'
do
include
Devise
::
Test
::
ControllerHelpers
let
(
:user
)
{
create
(
:user
)
}
let
(
:target_project
)
{
create
(
:project
)
}
let
(
:source_project
)
do
create
(
:project
,
forked_from_project:
target_project
)
end
let
(
:merge_request
)
do
create
(
:merge_request
,
:simple
,
source_project:
source_project
,
target_project:
target_project
,
author:
user
)
end
before
do
controller
.
prepend_view_path
(
'app/views/projects'
)
assign
(
:merge_request
,
merge_request
)
assign
(
:commits
,
merge_request
.
commits
)
end
it
'shows commits from source project'
do
render
commit
=
source_project
.
commit
(
merge_request
.
source_branch
)
href
=
namespace_project_commit_path
(
source_project
.
namespace
,
source_project
,
commit
)
expect
(
rendered
).
to
have_link
(
Commit
.
truncate_sha
(
commit
.
sha
),
href:
href
)
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