Skip to content

Commit f9303b2

Browse files
committed
✅ Silence warnings printed during tests
1 parent 7761764 commit f9303b2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/net/imap/test_fetch_data.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ def fetch_data_class
4545
end
4646

4747
test "#deconstruct_keys" do
48-
Net::IMAP::UIDFetchData.new(22222, "UID" => 54_321) => {
49-
uid: 22222
50-
}
48+
assert_warn(/UIDs do not match/i) do
49+
Net::IMAP::UIDFetchData.new(22222, "UID" => 54_321) => {
50+
uid: 22222
51+
}
52+
end
5153
end
5254
end
5355

@@ -102,7 +104,7 @@ def fetch_data_class
102104
end
103105

104106
test "#internaldate parses a datetime value" do
105-
assert_nil fetch_data_class.new(123, { "UID" => 456 }).internaldate
107+
assert_nil fetch_data_class.new(123, { "UID" => 123 }).internaldate
106108
data = fetch_data_class.new(1, { "INTERNALDATE" => "17-Jul-1996 02:44:25 -0700" })
107109
time = Time.parse("1996-07-17T02:44:25-0700")
108110
assert_equal time, data.internaldate

0 commit comments

Comments
 (0)