diff options
author | Jaakko Kantojärvi <jaakko@n-1.fi> | 2013-02-15 13:31:05 +0400 |
---|---|---|
committer | Jaakko Kantojärvi <jaakko@n-1.fi> | 2013-02-17 23:31:20 +0400 |
commit | 27f4cf75422d2995fdd403ee9562ab30afe85536 (patch) | |
tree | e72260ed533a242d3203eb6c1c628f2238ba6f59 /spec/models/key_spec.rb | |
parent | 6fd88b8cbba62d1af4e249cee455a30df0eb0b1b (diff) |
Tests to validate that invalid keys are rejected
Diffstat (limited to 'spec/models/key_spec.rb')
-rw-r--r-- | spec/models/key_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb index 94b952cf932..a9ab2f05a34 100644 --- a/spec/models/key_spec.rb +++ b/spec/models/key_spec.rb @@ -73,8 +73,12 @@ describe Key do build(:key, user: user).should be_valid end - it "rejects the unfingerprintable key" do + it "rejects the unfingerprintable key (contains space in middle)" do build(:key_with_a_space_in_the_middle).should_not be_valid end + + it "rejects the unfingerprintable key (not a key)" do + build(:invalid_key).should_not be_valid + end end end |