Reject ssh keys that break gitolite.
Failing test. Working check.
This commit is contained in:
parent
8f9a450eed
commit
f3ce02b5c9
3 changed files with 35 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue