From d2680fd9f374c32401e74e824e71bdd00217016f Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 18 Dec 2015 09:28:20 +0800 Subject: [PATCH] permissions on synapse spec --- spec/models/synapse_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/models/synapse_spec.rb b/spec/models/synapse_spec.rb index 2363394c..f42427b8 100644 --- a/spec/models/synapse_spec.rb +++ b/spec/models/synapse_spec.rb @@ -8,6 +8,8 @@ RSpec.describe Synapse, type: :model do it { is_expected.to belong_to :topic2 } it { is_expected.to have_many :maps } 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) } context 'permissions' do let(:owner) { create :user }