summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-07-21 17:37:33 -0700
committerStan Hu <stanhu@gmail.com>2015-07-23 12:53:54 -0700
commitae3f869fd1f4326e26805606197dea4ea15c67bb (patch)
tree725ec9afb838a3b083db5ad97a6d1dbd4ba46b8a /spec/javascripts
parent5dd4dea93baa6386ed860a50125dce3ca3890f16 (diff)
downloadgitlab-ce-ae3f869fd1f4326e26805606197dea4ea15c67bb.tar.gz
Fix the "Reload with full diff" URL button
On the first load, the merge request tabs would be requested in JSON format to render the HTML. This would cause the "Reload with full diff" button to create a link to diff.json. Closes #2041
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/merge_request_tabs_spec.js.coffee6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/javascripts/merge_request_tabs_spec.js.coffee b/spec/javascripts/merge_request_tabs_spec.js.coffee
index 6cc96fb68a0..a0cfba455ea 100644
--- a/spec/javascripts/merge_request_tabs_spec.js.coffee
+++ b/spec/javascripts/merge_request_tabs_spec.js.coffee
@@ -51,6 +51,12 @@ describe 'MergeRequestTabs', ->
expect(@subject('notes')).toBe('/foo/bar/merge_requests/1')
expect(@subject('commits')).toBe('/foo/bar/merge_requests/1/commits')
+ it 'changes from diffs.html', ->
+ @class._location = stubLocation(pathname: '/foo/bar/merge_requests/1/diffs.html')
+
+ expect(@subject('notes')).toBe('/foo/bar/merge_requests/1')
+ expect(@subject('commits')).toBe('/foo/bar/merge_requests/1/commits')
+
it 'changes from notes', ->
@class._location = stubLocation(pathname: '/foo/bar/merge_requests/1')