20 lines
544 B
Ruby
20 lines
544 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe InstallationConfig do
|
|
subject(:installation_config) { described_class.new(name: 'INSTALLATION_NAME') }
|
|
|
|
it { is_expected.to validate_presence_of(:name) }
|
|
|
|
describe 'new record defaults' do
|
|
it 'initializes serialized_value with indifferent access' do
|
|
expect(installation_config.serialized_value).to eq({}.with_indifferent_access)
|
|
end
|
|
|
|
it 'returns nil for value before assignment' do
|
|
expect(installation_config.value).to be_nil
|
|
end
|
|
end
|
|
end
|