spec/models/file_usage_spec.rb in sufia-6.3.0 vs spec/models/file_usage_spec.rb in sufia-6.4.0

- old
+ new

@@ -53,11 +53,11 @@ OpenStruct.new(date: date_strs[4], pageviews: 2) ] end let(:usage) do - allow_any_instance_of(GenericFile).to receive(:create_date).and_return((Date.today - 4.day).to_s) + allow_any_instance_of(GenericFile).to receive(:create_date).and_return((Date.today - 4.days).to_s) expect(FileDownloadStat).to receive(:ga_statistics).and_return(sample_download_statistics) expect(FileViewStat).to receive(:ga_statistics).and_return(sample_pageview_statistics) described_class.new(file.id) end @@ -121,10 +121,10 @@ end end describe "create date after earliest" do let(:usage) do - allow_any_instance_of(GenericFile).to receive(:create_date).and_return((Date.today - 4.day).to_s) + allow_any_instance_of(GenericFile).to receive(:create_date).and_return((Date.today - 4.days).to_s) expect(FileDownloadStat).to receive(:ga_statistics).and_return(sample_download_statistics) expect(FileViewStat).to receive(:ga_statistics).and_return(sample_pageview_statistics) Sufia.config.analytic_start_date = earliest described_class.new(file.id) end