mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-18 00:17:25 +00:00
14 lines
442 B
Ruby
14 lines
442 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe DfcPermission do
|
|
it { is_expected.to belong_to :user }
|
|
it { is_expected.to belong_to :enterprise }
|
|
it { is_expected.to validate_presence_of :grantee }
|
|
it { is_expected.to validate_presence_of :scope }
|
|
it {
|
|
is_expected.to validate_inclusion_of(:scope)
|
|
.in_array(%w[ReadEnterprise ReadProducts ReadOrders])
|
|
.in_array(%w[WriteEnterprise WriteProducts WriteOrders])
|
|
}
|
|
end
|