diff options
author | Stan Hu <stanhu@gmail.com> | 2015-04-26 23:42:29 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-04-30 12:44:46 -0700 |
commit | ee92dd1683febd03e1d7ade40449ba114a67e1f5 (patch) | |
tree | 9dff492ff6d9659f9a883a20b9adfbe29180f059 /spec/controllers | |
parent | 39a55bdf1a1613f362bcd7da444b291210454160 (diff) | |
download | gitlab-ce-ee92dd1683febd03e1d7ade40449ba114a67e1f5.tar.gz |
Unescape branch names in compare commit
Closes #1399
Closes https://github.com/gitlabhq/gitlabhq/issues/9105
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/compare_controller_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/controllers/projects/compare_controller_spec.rb b/spec/controllers/projects/compare_controller_spec.rb new file mode 100644 index 00000000000..23e1566b8f3 --- /dev/null +++ b/spec/controllers/projects/compare_controller_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe Projects::CompareController do + let(:project) { create(:project) } + let(:user) { create(:user) } + let(:ref_from) { "improve%2Fawesome" } + let(:ref_to) { "feature" } + + before do + sign_in(user) + project.team << [user, :master] + end + + it 'compare should show some diffs' do + get(:show, namespace_id: project.namespace.to_param, + project_id: project.to_param, from: ref_from, to: ref_to) + + expect(response).to be_success + expect(assigns(:diffs).length).to be >= 1 + expect(assigns(:commits).length).to be >= 1 + end +end |