diff --git a/app/services/billing_service.rb b/app/services/billing_service.rb index f2ccc8f70ddd..629da638b810 100644 --- a/app/services/billing_service.rb +++ b/app/services/billing_service.rb @@ -23,10 +23,10 @@ def call private def today - @today ||= Time.zone.now + @today ||= Time.current end - # NOTE: Retrieve list of subscription that should be billed today + # NOTE: Retrieve list of subscriptions that should be billed today def billable_subscriptions sql = [] diff --git a/spec/services/billing_service_spec.rb b/spec/services/billing_service_spec.rb index 6848144471ee..c2388152e085 100644 --- a/spec/services/billing_service_spec.rb +++ b/spec/services/billing_service_spec.rb @@ -28,7 +28,7 @@ before { subscription } - it 'enqueue a job on billing day' do + it 'enqueues a job on billing day' do current_date = DateTime.parse('20 Jun 2022') travel_to(current_date) do @@ -52,7 +52,7 @@ let(:interval) { :monthly } let(:billing_time) { :calendar } - it 'enqueue a job on billing day' do + it 'enqueues a job on billing day' do current_date = DateTime.parse('01 Feb 2022') travel_to(current_date) do @@ -76,7 +76,7 @@ let(:interval) { :yearly } let(:billing_time) { :calendar } - it 'enqueue a job on billing day' do + it 'enqueues a job on billing day' do current_date = DateTime.parse('01 Jan 2022') travel_to(current_date) do @@ -119,7 +119,7 @@ let(:current_date) { DateTime.parse('20 Jun 2022').prev_occurring(subscription_date.strftime('%A').downcase.to_sym) } - it 'enqueue a job on billing day' do + it 'enqueues a job on billing day' do travel_to(current_date) do billing_service.call @@ -140,7 +140,7 @@ let(:billing_time) { :anniversary } let(:current_date) { subscription_date.next_month } - it 'enqueue a job on billing day' do + it 'enqueues a job on billing day' do travel_to(current_date) do billing_service.call @@ -159,7 +159,7 @@ let(:subscription_date) { DateTime.parse('31 Mar 2021') } let(:current_date) { DateTime.parse('28 Feb 2022') } - it 'enqueue a job if the month count less than 31 days' do + it 'enqueues a job if the month count less than 31 days' do travel_to(current_date) do billing_service.call @@ -176,7 +176,7 @@ let(:current_date) { subscription_date.next_year } - it 'enqueue a job on billing day' do + it 'enqueues a job on billing day' do travel_to(current_date) do billing_service.call @@ -195,7 +195,7 @@ let(:subscription_date) { DateTime.parse('29 Feb 2020') } let(:current_date) { DateTime.parse('28 Feb 2022') } - it 'enqueue a job on 28th of february when year is not a leap year' do + it 'enqueues a job on 28th of february when year is not a leap year' do travel_to(current_date) do billing_service.call @@ -222,7 +222,7 @@ let(:subscription_date) { DateTime.parse('31 Mar 2021') } let(:current_date) { DateTime.parse('28 Feb 2022') } - it 'enqueue a job if the month count less than 31 days' do + it 'enqueues a job if the month count less than 31 days' do travel_to(current_date) do billing_service.call @@ -255,7 +255,7 @@ before { subscription } - it 'enqueue a job on billing day' do + it 'enqueues a job on billing day' do current_date = DateTime.parse('01 Feb 2022') travel_to(current_date) do