Merge commit 'e235c446c96280c015fb27f7eefe4e95a5a39892' into glitch-soc/merge-upstream
This commit is contained in:
commit
4bcd0caa79
70 files changed
+1060
-109
No files matched your search
@@ -108,6 +108,24 @@ RSpec.describe TermsOfService do
|
||||
end
|
||||
end
|
||||
|
||||
describe '#usable_effective_date' do
|
||||
subject { terms_of_service.usable_effective_date }
|
||||
|
||||
let(:terms_of_service) { Fabricate.build(:terms_of_service, effective_date:) }
|
||||
|
||||
context 'when effective_date value is set' do
|
||||
let(:effective_date) { 5.days.ago }
|
||||
|
||||
it { is_expected.to eq(effective_date.to_date) }
|
||||
end
|
||||
|
||||
context 'when effective_date value is not set' do
|
||||
let(:effective_date) { nil }
|
||||
|
||||
it { is_expected.to eq(Time.zone.today) }
|
||||
end
|
||||
end
|
||||
|
||||
describe '::current' do
|
||||
context 'when no terms exist' do
|
||||
it 'returns nil' do
|
||||
|
||||
Reference in new issue
Block a user