2021-01-29 00:20:46 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe DependencyProxy::GroupSetting, type: :model do
|
|
|
|
describe 'relationships' do
|
|
|
|
it { is_expected.to belong_to(:group) }
|
|
|
|
end
|
|
|
|
|
2023-01-13 00:05:48 +05:30
|
|
|
describe 'default values' do
|
|
|
|
it { is_expected.to be_enabled }
|
|
|
|
it { expect(described_class.new(enabled: false)).not_to be_enabled }
|
|
|
|
end
|
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
describe 'validations' do
|
|
|
|
it { is_expected.to validate_presence_of(:group) }
|
|
|
|
end
|
|
|
|
end
|