summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMatthew Dodds <matthewrusselldodds@gmail.com>2016-10-01 03:32:21 -0400
committerMatthew Dodds <matthewrusselldodds@gmail.com>2016-10-01 03:32:55 -0400
commit6d1cd0e2085d8654dbcfeac61825b7b2cf5f1f15 (patch)
treec29b52d0fbe9665ebca2c70d6c718c72885b56c1 /spec
parent0c0b6f438ee5ac12f9975fb1c3b1dc93f6447015 (diff)
downloadgitlab-ce-6d1cd0e2085d8654dbcfeac61825b7b2cf5f1f15.tar.gz
Add a spec to verify comparison context inclusion in path when a version is chosen to compare against
Diffstat (limited to 'spec')
-rw-r--r--spec/features/merge_requests/merge_request_versions_spec.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/features/merge_requests/merge_request_versions_spec.rb b/spec/features/merge_requests/merge_request_versions_spec.rb
index 22d9e42119d..32b0b65fbac 100644
--- a/spec/features/merge_requests/merge_request_versions_spec.rb
+++ b/spec/features/merge_requests/merge_request_versions_spec.rb
@@ -1,12 +1,13 @@
require 'spec_helper'
feature 'Merge Request versions', js: true, feature: true do
+ let(:merge_request) { create(:merge_request, importing: true) }
+ let(:project) { merge_request.source_project }
+
before do
login_as :admin
- merge_request = create(:merge_request, importing: true)
merge_request.merge_request_diffs.create(head_commit_sha: '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9')
merge_request.merge_request_diffs.create(head_commit_sha: '5937ac0a7beb003549fc5fd26fc247adbce4a52e')
- project = merge_request.source_project
visit diffs_namespace_project_merge_request_path(project.namespace, project, merge_request)
end
@@ -47,6 +48,16 @@ feature 'Merge Request versions', js: true, feature: true do
end
end
+ it 'has a path with comparison context' do
+ expect(page).to have_current_path diffs_namespace_project_merge_request_path(
+ project.namespace,
+ project,
+ merge_request.iid,
+ diff_id: 2,
+ start_sha: '6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9'
+ )
+ end
+
it 'should have correct value in the compare dropdown' do
page.within '.mr-version-compare-dropdown' do
expect(page).to have_content 'version 1'