Skip to content

Commit e2e27f4

Browse files
committed
Stabilize to_json test by freezing time
1 parent d64d64d commit e2e27f4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/unit/test_transloadit.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@
108108
end
109109

110110
it "must produce Transloadit-compatible JSON output" do
111-
_(@transloadit.to_json).must_equal MultiJson.dump(@transloadit.to_hash)
111+
fixed_time = Time.utc(2025, 10, 28, 0, 0, 0)
112+
Time.stub :now, fixed_time do
113+
_(@transloadit.to_json).must_equal MultiJson.dump(@transloadit.to_hash)
114+
end
112115
end
113116
end
114117

0 commit comments

Comments
 (0)