File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -36,20 +36,24 @@ def fetch_data_class
36
36
assert_equal 22222 , data . uid
37
37
end
38
38
39
- test "#uid warns when differs from UID attribute" do
40
- data = nil
39
+ test "#initialize warns when uid differs from attr['UID']" do
41
40
assert_warn ( /UIDs do not match/i ) do
42
- data = Net ::IMAP ::UIDFetchData . new ( 22222 , "UID" => 54_321 )
41
+ Net ::IMAP ::UIDFetchData . new ( 22222 , "UID" => 54_321 )
43
42
end
43
+ end
44
+
45
+ test "#uid ignores the UID attribute" do
46
+ data = EnvUtil . suppress_warning {
47
+ Net ::IMAP ::UIDFetchData . new ( 22222 , "UID" => 54_321 )
48
+ }
44
49
assert_equal 22222 , data . uid
45
50
end
46
51
47
52
test "#deconstruct_keys" do
48
- assert_warn ( /UIDs do not match/i ) do
49
- Net ::IMAP ::UIDFetchData . new ( 22222 , "UID" => 54_321 ) => {
50
- uid : 22222
51
- }
52
- end
53
+ data = EnvUtil . suppress_warning {
54
+ Net ::IMAP ::UIDFetchData . new ( 22222 , "UID" => 54_321 )
55
+ }
56
+ assert_pattern { data => { uid : 22222 } }
53
57
end
54
58
end
55
59
You can’t perform that action at this time.
0 commit comments