permissions on synapse spec

This commit is contained in:
Devin Howard 2015-12-18 09:28:20 +08:00
parent acd048bd0d
commit d2680fd9f3

View file

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