Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-07-25 21:35:44 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 16:46:03 +0300
commit843b1de0dec3e101b323737e4d345c4e58b2a0c3 (patch)
treee75c17d342d0d0fccbd2b8a261fa0d2bd57c4506 /spec/models/gpg_key_spec.rb
parent14551424c9fd3a9401559e6d2da34be8d1fdd45c (diff)
simplify nil handling
Diffstat (limited to 'spec/models/gpg_key_spec.rb')
-rw-r--r--spec/models/gpg_key_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/models/gpg_key_spec.rb b/spec/models/gpg_key_spec.rb
index 06bdbb59a11..1242f0b2e2a 100644
--- a/spec/models/gpg_key_spec.rb
+++ b/spec/models/gpg_key_spec.rb
@@ -44,6 +44,10 @@ describe GpgKey do
expect(described_class.new(key: " #{key} ").key).to eq(key)
end
+
+ it 'does not strip when the key is nil' do
+ expect(described_class.new(key: nil).key).to be_nil
+ end
end
describe '#user_infos' do