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
Jérome Perrin
gitlab-ce
Commits
6e7e5052
Commit
6e7e5052
authored
Dec 29, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include all expected instance vars for _show.html.haml template within tests
parent
0ea54833
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
app/views/projects/notes/_notes_with_form.html.haml
app/views/projects/notes/_notes_with_form.html.haml
+1
-1
spec/views/projects/merge_requests/show.html.haml_spec.rb
spec/views/projects/merge_requests/show.html.haml_spec.rb
+6
-1
No files found.
app/views/projects/notes/_notes_with_form.html.haml
View file @
6e7e5052
...
...
@@ -20,4 +20,4 @@
to post a comment
:javascript
var
notes
=
new
Notes
(
"
#{
namespace_project_notes_path
(
namespace_id:
@project
.
namespace
,
target_id:
@noteable
.
id
,
target_type:
@noteable
.
class
.
name
.
underscore
)
}
"
,
#{
@notes
.
map
(
&
:id
).
to_json
}
,
#{
Time
.
now
.
to_i
}
,
"
#{
diff_view
}
"
)
var
notes
=
new
Notes
(
"
#{
namespace_project_notes_path
(
namespace_id:
@project
.
namespace
,
project_id:
@project
,
target_id:
@noteable
.
id
,
target_type:
@noteable
.
class
.
name
.
underscore
)
}
"
,
#{
@notes
.
map
(
&
:id
).
to_json
}
,
#{
Time
.
now
.
to_i
}
,
"
#{
diff_view
}
"
)
spec/views/projects/merge_requests/show.html.haml_spec.rb
View file @
6e7e5052
...
...
@@ -7,6 +7,7 @@ describe 'projects/merge_requests/show.html.haml' do
let
(
:project
)
{
create
(
:project
)
}
let
(
:fork_project
)
{
create
(
:project
,
forked_from_project:
project
)
}
let
(
:unlink_project
)
{
Projects
::
UnlinkForkService
.
new
(
fork_project
,
user
)
}
let
(
:note
)
{
create
(
:note_on_merge_request
,
project:
project
,
noteable:
closed_merge_request
)
}
let
(
:closed_merge_request
)
do
create
(
:closed_merge_request
,
...
...
@@ -19,8 +20,12 @@ describe 'projects/merge_requests/show.html.haml' do
assign
(
:project
,
project
)
assign
(
:merge_request
,
closed_merge_request
)
assign
(
:commits_count
,
0
)
assign
(
:note
,
note
)
assign
(
:noteable
,
closed_merge_request
)
assign
(
:notes
,
[])
assign
(
:pipelines
,
Ci
::
Pipeline
.
none
)
allow
(
view
).
to
receive
(
:can?
).
and_return
(
true
)
allow
(
view
).
to
receive
_messages
(
current_user:
user
,
can?:
true
)
end
context
'when the merge request is closed'
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