@@ -59,7 +59,7 @@ def test_error_failed_operation
59
59
@tcp_socket . should_receive ( :read_ber ) . and_return ( [ 2 , ber ] )
60
60
61
61
result = @connection . modify ( :dn => "1" , :operations => [ [ :replace , "mail" , "something@sothsdkf.com" ] ] )
62
- assert_predicate result , : failure?
62
+ assert result . failure? , "should be failure"
63
63
assert_equal "The provided password value was rejected by a password validator: The provided password did not contain enough characters from the character set 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'. The minimum number of characters from that set that must be present in user passwords is 1" , result . error_message
64
64
end
65
65
@@ -69,7 +69,7 @@ def test_no_error_on_success
69
69
@tcp_socket . should_receive ( :read_ber ) . and_return ( [ 2 , ber ] )
70
70
71
71
result = @connection . modify ( :dn => "1" , :operations => [ [ :replace , "mail" , "something@sothsdkf.com" ] ] )
72
- assert_predicate result , : success?
72
+ assert result . success? , "should be success"
73
73
assert_equal "" , result . error_message
74
74
end
75
75
end
@@ -96,7 +96,7 @@ def test_write_net_ldap_connection_event
96
96
events = @service . subscribe "write.net_ldap_connection"
97
97
98
98
result = @connection . bind ( method : :anon )
99
- assert_predicate result , : success?
99
+ assert result . success? , "should be success"
100
100
101
101
# a write event
102
102
payload , result = events . pop
@@ -113,7 +113,7 @@ def test_read_net_ldap_connection_event
113
113
events = @service . subscribe "read.net_ldap_connection"
114
114
115
115
result = @connection . bind ( method : :anon )
116
- assert_predicate result , : success?
116
+ assert result . success? , "should be success"
117
117
118
118
# a read event
119
119
payload , result = events . pop
@@ -130,12 +130,12 @@ def test_bind_net_ldap_connection_event
130
130
events = @service . subscribe "bind.net_ldap_connection"
131
131
132
132
result = @connection . bind ( method : :anon )
133
- assert_predicate result , : success?
133
+ assert result . success? , "should be success"
134
134
135
135
# a read event
136
136
payload , result = events . pop
137
137
assert payload . has_key? ( :result )
138
- assert_predicate result , : success?
138
+ assert result . success? , "should be success"
139
139
end
140
140
141
141
def test_search_net_ldap_connection_event
@@ -156,7 +156,7 @@ def test_search_net_ldap_connection_event
156
156
events = @service . subscribe "search.net_ldap_connection"
157
157
158
158
result = @connection . search ( filter : "(uid=user1)" )
159
- assert_predicate result , : success?
159
+ assert result . success? , "should be success"
160
160
161
161
# a search event
162
162
payload , result = events . pop
0 commit comments