Reject ssh keys that break gitolite.

Failing test.

Working check.
This commit is contained in:
Sytse Sijbrandij 2012-09-21 18:22:43 +02:00
parent 8f9a450eed
commit f3ce02b5c9
3 changed files with 35 additions and 6 deletions

View file

@ -46,4 +46,16 @@ describe Key do
end
end
end
context "validate it is a fingerprintable key" do
let(:user) { Factory.create(:user) }
it "accepts the fingerprintable key" do
build(:key, user: user).should be_valid
end
it "rejects the unfingerprintable key" do
build(:key_with_a_space_in_the_middle).should_not be_valid
end
end
end