synapse desc validation

This commit is contained in:
Devin Howard 2015-12-20 21:55:10 +08:00
parent c7f7fa1d1b
commit f85bf74b2e

View file

@ -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 }