2015-04-14 10:00:43 +00:00
|
|
|
require "spec_helper"
|
|
|
|
|
2017-07-10 14:24:02 +00:00
|
|
|
describe Gitlab::KeyFingerprint do
|
2015-04-14 10:00:43 +00:00
|
|
|
let(:key) { "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=" }
|
|
|
|
let(:fingerprint) { "3f:a2:ee:de:b5:de:53:c3:aa:2f:9c:45:24:4c:47:7b" }
|
|
|
|
|
|
|
|
describe "#fingerprint" do
|
|
|
|
it "generates the key's fingerprint" do
|
2017-07-25 17:09:00 +00:00
|
|
|
expect(described_class.new(key).fingerprint).to eq(fingerprint)
|
2015-04-14 10:00:43 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|