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:
authorJaakko Kantojärvi <jaakko@n-1.fi>2013-02-15 13:31:05 +0400
committerJaakko Kantojärvi <jaakko@n-1.fi>2013-02-17 23:31:20 +0400
commit27f4cf75422d2995fdd403ee9562ab30afe85536 (patch)
treee72260ed533a242d3203eb6c1c628f2238ba6f59 /spec/models/key_spec.rb
parent6fd88b8cbba62d1af4e249cee455a30df0eb0b1b (diff)
Tests to validate that invalid keys are rejected
Diffstat (limited to 'spec/models/key_spec.rb')
-rw-r--r--spec/models/key_spec.rb6
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