summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-06-28 14:01:39 -0500
committerDouwe Maan <douwe@selenight.nl>2017-06-28 14:01:49 -0500
commit78379f66ddbb2a1784e55533159993d5460f18a4 (patch)
treee9d7eb0a5661ca0a8766eae5039251066721f07e /spec
parent585e6aa5b20b31b1de01f7c5aa9aea67d7a377f4 (diff)
downloadgitlab-ce-78379f66ddbb2a1784e55533159993d5460f18a4.tar.gz
Strip trailing whitespace in relative submodule URLdm-relative-submodule-url-trailing-whitespace
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/submodule_helper_spec.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/helpers/submodule_helper_spec.rb b/spec/helpers/submodule_helper_spec.rb
index cb727430117..9e561d0f191 100644
--- a/spec/helpers/submodule_helper_spec.rb
+++ b/spec/helpers/submodule_helper_spec.rb
@@ -170,6 +170,11 @@ describe SubmoduleHelper do
expect(result).to eq(["/#{group.path}/test", "/#{group.path}/test/tree/#{commit_id}"])
end
+ it 'with trailing whitespace' do
+ result = relative_self_links('../test.git ', commit_id)
+ expect(result).to eq(["/#{group.path}/test", "/#{group.path}/test/tree/#{commit_id}"])
+ end
+
it 'two levels down' do
result = relative_self_links('../../test.git', commit_id)
expect(result).to eq(["/#{group.path}/test", "/#{group.path}/test/tree/#{commit_id}"])