mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
parent
8916eee169
commit
f76e1259fc
11 changed files with 106 additions and 65 deletions
|
@ -1,20 +1,6 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Billing::Price do
|
||||
describe '::unexpired' do
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010 00:00')
|
||||
|
||||
create(:price, id: 1, expire_time: Time.zone.parse('04.07.2010 23:59'))
|
||||
create(:price, id: 2, expire_time: Time.zone.parse('05.07.2010 00:00'))
|
||||
create(:price, id: 3, expire_time: Time.zone.parse('05.07.2010 00:01'))
|
||||
end
|
||||
|
||||
it 'returns prices with expire time in the future ' do
|
||||
expect(described_class.unexpired.ids).to eq([2, 3])
|
||||
end
|
||||
end
|
||||
|
||||
describe '::expired' do
|
||||
before :example do
|
||||
travel_to Time.zone.parse('05.07.2010 00:00')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue