From f85bf74b2eb7105087e13623bc2da4dace6f7dca Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sun, 20 Dec 2015 21:55:10 +0800 Subject: [PATCH] synapse desc validation --- spec/models/synapse_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/models/synapse_spec.rb b/spec/models/synapse_spec.rb index 17fc8cdd..a1069805 100644 --- a/spec/models/synapse_spec.rb +++ b/spec/models/synapse_spec.rb @@ -8,8 +8,7 @@ RSpec.describe Synapse, type: :model do it { is_expected.to have_many :mappings } it { is_expected.to validate_presence_of :permission } it { is_expected.to validate_inclusion_of(:permission).in_array Perm::ISSIONS.map(&:to_s) } - - pending "validate that desc can't be nil - important for javascript" + it { is_expected.to validate_length_of(:desc).is_at_least(0) } # TODO don't allow nil context 'permissions' do let(:owner) { create :user }