Browse Source

CLDC-4325: Add a corresponding return to timecop missing one

pull/3250/head
samyou-softwire 2 weeks ago
parent
commit
6f5446e956
  1. 4
      spec/requests/collection_resources_controller_spec.rb
  2. 4
      spec/services/bulk_upload/sales/validator_spec.rb

4
spec/requests/collection_resources_controller_spec.rb

@ -126,7 +126,7 @@ RSpec.describe CollectionResourcesController, type: :request do
context "when the collection year has not started yet" do context "when the collection year has not started yet" do
before do before do
Timecop.freeze(Time.zone.local(current_collection_start_year, 3, 1)) Timecop.travel(Time.zone.local(current_collection_start_year, 3, 1))
get collection_resources_path get collection_resources_path
end end
@ -180,7 +180,7 @@ RSpec.describe CollectionResourcesController, type: :request do
context "when the collection year has not started yet" do context "when the collection year has not started yet" do
before do before do
Timecop.freeze(Time.zone.local(current_collection_start_year, 3, 1)) Timecop.travel(Time.zone.local(current_collection_start_year, 3, 1))
get collection_resources_path get collection_resources_path
end end

4
spec/services/bulk_upload/sales/validator_spec.rb

@ -42,6 +42,10 @@ RSpec.describe BulkUpload::Sales::Validator do
file.rewind file.rewind
end end
after do
Timecop.return
end
it "is not valid" do it "is not valid" do
expect(validator).not_to be_valid expect(validator).not_to be_valid
end end

Loading…
Cancel
Save