3d6d0a09b6
This allows admins to define terms in the application settings. Every time the terms are adjusted, a new version is stored and becomes the 'active' version. This allows tracking which specific version was accepted by a user.
15 lines
306 B
Ruby
15 lines
306 B
Ruby
require 'spec_helper'
|
|
|
|
describe ApplicationSetting::Term do
|
|
describe 'validations' do
|
|
it { is_expected.to validate_presence_of(:terms) }
|
|
end
|
|
|
|
describe '.latest' do
|
|
it 'finds the latest terms' do
|
|
terms = create(:term)
|
|
|
|
expect(described_class.latest).to eq(terms)
|
|
end
|
|
end
|
|
end
|