diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-05 14:03:36 +0200 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 15:43:37 +0200 |
commit | e79e2ae1f4b671488b31428f7a6506a245a7bddc (patch) | |
tree | ecf76d0362f49611a4de5b57dd7afe9f59f7aae9 /spec/models/gpg_key_spec.rb | |
parent | d9fd3709abb7897785ac111c217b532663313abd (diff) | |
download | gitlab-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.rb | 1 |
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) } |