summaryrefslogtreecommitdiff
path: root/spec/models/gpg_key_spec.rb
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-07-05 14:03:36 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 15:43:37 +0200
commite79e2ae1f4b671488b31428f7a6506a245a7bddc (patch)
treeecf76d0362f49611a4de5b57dd7afe9f59f7aae9 /spec/models/gpg_key_spec.rb
parentd9fd3709abb7897785ac111c217b532663313abd (diff)
downloadgitlab-ce-e79e2ae1f4b671488b31428f7a6506a245a7bddc.tar.gz
validate presence of user on gpg_key
Diffstat (limited to 'spec/models/gpg_key_spec.rb')
-rw-r--r--spec/models/gpg_key_spec.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/models/gpg_key_spec.rb b/spec/models/gpg_key_spec.rb
index 88b5eb79b59..ffbf8760e86 100644
--- a/spec/models/gpg_key_spec.rb
+++ b/spec/models/gpg_key_spec.rb
@@ -6,6 +6,7 @@ describe GpgKey do
end
describe "validation" do
+ it { is_expected.to validate_presence_of(:user) }
it { is_expected.to validate_presence_of(:key) }
it { is_expected.to validate_uniqueness_of(:key) }
it { is_expected.to allow_value("-----BEGIN PGP PUBLIC KEY BLOCK-----\nkey").for(:key) }