Skip to content

Commit cf2f47b

Browse files
committed
Rounding date comparisons in expectations due to drift when using the default precision
1 parent cfd6cee commit cf2f47b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/models/file_download_stat_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
expect(file_stat).to respond_to(:date)
1111
expect(file_stat).to respond_to(:file_id)
1212
expect(file_stat.file_id).to eq("99")
13-
expect(file_stat.date).to eq(date)
13+
expect(file_stat.date.round(0)).to eq(date.round(0))
1414
expect(file_stat.downloads).to eq(2)
1515
end
1616

spec/models/file_view_stat_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
expect(file_stat).to respond_to(:date)
1212
expect(file_stat).to respond_to(:file_id)
1313
expect(file_stat.file_id).to eq("99")
14-
expect(file_stat.date).to eq(date)
14+
expect(file_stat.date.round(0)).to eq(date.round(0))
1515
expect(file_stat.views).to eq(25)
1616
expect(file_stat.user_id).to eq(user_id)
1717
end

0 commit comments

Comments
 (0)