summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ssh_public_key_spec.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-02-16 16:00:03 -0600
committerMike Greiling <mike@pixelcog.com>2018-02-16 16:00:03 -0600
commit8e65c13a586031928c681c4926d059df23ad5753 (patch)
treedf99f6a592a2d3f7f5fabb4c85c6b90f0343ca68 /spec/lib/gitlab/ssh_public_key_spec.rb
parentfa260ac8400b16bc19acc5740b47c596c1c903c0 (diff)
parentb236348388c46c0550ec6844df35ec2689c4060b (diff)
downloadgitlab-ce-8e65c13a586031928c681c4926d059df23ad5753.tar.gz
Merge branch 'master' into chart.html.haml-refactorchart.html.haml-refactor
* master: (484 commits) migrate admin:users:* to static bundle correct for missing break statement in dispatcher.js alias create and update actions to new and edit migrate projects:merge_requests:edit to static bundle migrate projects:merge_requests:creations:diffs to static bundle migrate projects:merge_requests:creations:new to static bundle migrate projects:issues:new and projects:issues:edit to static bundle migrate projects:branches:index to static bundle migrate projects:branches:new to static bundle migrate projects:compare:show to static bundle migrate projects:environments:metrics to static bundle migrate projects:milestones:* and groups:milestones:* to static bundle migrate explore:groups:index to static bundle migrate explore:projects:* to static bundle migrate dashboard:projects:* to static bundle migrate admin:jobs:index to static bundle migrate dashboard:todos:index to static bundle migrate groups:merge_requests to static bundle migrate groups:issues to static bundle migrate dashboard:merge_requests to static bundle ...
Diffstat (limited to 'spec/lib/gitlab/ssh_public_key_spec.rb')
-rw-r--r--spec/lib/gitlab/ssh_public_key_spec.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/spec/lib/gitlab/ssh_public_key_spec.rb b/spec/lib/gitlab/ssh_public_key_spec.rb
index c15e29774b6..93d538141ce 100644
--- a/spec/lib/gitlab/ssh_public_key_spec.rb
+++ b/spec/lib/gitlab/ssh_public_key_spec.rb
@@ -37,41 +37,6 @@ describe Gitlab::SSHPublicKey, lib: true do
end
end
- describe '.sanitize(key_content)' do
- let(:content) { build(:key).key }
-
- context 'when key has blank space characters' do
- it 'removes the extra blank space characters' do
- unsanitized = content.insert(100, "\n")
- .insert(40, "\r\n")
- .insert(30, ' ')
-
- sanitized = described_class.sanitize(unsanitized)
- _, body = sanitized.split
-
- expect(sanitized).not_to eq(unsanitized)
- expect(body).not_to match(/\s/)
- end
- end
-
- context "when key doesn't have blank space characters" do
- it "doesn't modify the content" do
- sanitized = described_class.sanitize(content)
-
- expect(sanitized).to eq(content)
- end
- end
-
- context "when key is invalid" do
- it 'returns the original content' do
- unsanitized = "ssh-foo any content=="
- sanitized = described_class.sanitize(unsanitized)
-
- expect(sanitized).to eq(unsanitized)
- end
- end
- end
-
describe '#valid?' do
subject { public_key }