summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-07-12 14:29:26 +0200
committerPaco Guzman <pacoguzmanp@gmail.com>2016-07-12 14:37:12 +0200
commitf1f9b5e2f0f7ab8515f263b79c09d9f98b0d302f (patch)
tree1f87709269516b4e8b9dccc55d3ed9c91dc4a988 /spec
parent3ca9253444710c6a2d5ad4dca345f8d558be4f1a (diff)
downloadgitlab-ce-f1f9b5e2f0f7ab8515f263b79c09d9f98b0d302f.tar.gz
Be explicit on merge request discussion variables
Diffstat (limited to 'spec')
-rw-r--r--spec/features/merge_requests/diffs_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/features/merge_requests/diffs_spec.rb b/spec/features/merge_requests/diffs_spec.rb
new file mode 100644
index 00000000000..c9a0059645d
--- /dev/null
+++ b/spec/features/merge_requests/diffs_spec.rb
@@ -0,0 +1,25 @@
+require 'spec_helper'
+
+feature 'Diffs URL', js: true, feature: true do
+ before do
+ login_as :admin
+ @merge_request = create(:merge_request)
+ @project = @merge_request.source_project
+ end
+
+ context 'when visit with */* as accept header' do
+ before(:each) do
+ page.driver.add_header('Accept', '*/*')
+ end
+
+ it 'renders the notes' do
+ create :note_on_merge_request, project: @project, noteable: @merge_request, note: 'Rebasing with master'
+
+ visit diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
+
+ # Load notes and diff through AJAX
+ expect(page).to have_css('.note-text', visible: false, text: 'Rebasing with master')
+ expect(page).to have_css('.diffs.tab-pane.active')
+ end
+ end
+end