permissions on synapse spec
This commit is contained in:
parent
acd048bd0d
commit
d2680fd9f3
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,8 @@ RSpec.describe Synapse, type: :model do
|
||||||
it { is_expected.to belong_to :topic2 }
|
it { is_expected.to belong_to :topic2 }
|
||||||
it { is_expected.to have_many :maps }
|
it { is_expected.to have_many :maps }
|
||||||
it { is_expected.to have_many :mappings }
|
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
|
context 'permissions' do
|
||||||
let(:owner) { create :user }
|
let(:owner) { create :user }
|
||||||
|
|
Loading…
Reference in a new issue