@@ -1288,24 +1288,24 @@ def test_delete_with_custom_header
1288
1288
########################################################################
1289
1289
def test_exists
1290
1290
# Class method.
1291
- assert_not Person . exists? ( nil )
1292
- assert Person . exists? ( 1 )
1293
- assert_not Person . exists? ( 99 )
1291
+ assert_equal false , Person . exists? ( nil )
1292
+ assert_equal true , Person . exists? ( 1 )
1293
+ assert_equal false , Person . exists? ( 99 )
1294
1294
1295
1295
# Instance method.
1296
- assert_not Person . new . exists?
1297
- assert Person . find ( 1 ) . exists?
1298
- assert_not Person . new ( id : 99 ) . exists?
1296
+ assert_equal false , Person . new . exists?
1297
+ assert_equal true , Person . find ( 1 ) . exists?
1298
+ assert_equal false , Person . new ( id : 99 ) . exists?
1299
1299
1300
1300
# Nested class method.
1301
- assert StreetAddress . exists? ( 1 , params : { person_id : 1 } )
1302
- assert_not StreetAddress . exists? ( 1 , params : { person_id : 2 } )
1303
- assert_not StreetAddress . exists? ( 2 , params : { person_id : 1 } )
1301
+ assert_equal true , StreetAddress . exists? ( 1 , params : { person_id : 1 } )
1302
+ assert_equal false , StreetAddress . exists? ( 1 , params : { person_id : 2 } )
1303
+ assert_equal false , StreetAddress . exists? ( 2 , params : { person_id : 1 } )
1304
1304
1305
1305
# Nested instance method.
1306
- assert StreetAddress . find ( 1 , params : { person_id : 1 } ) . exists?
1307
- assert_not StreetAddress . new ( id : 1 , person_id : 2 ) . exists?
1308
- assert_not StreetAddress . new ( id : 2 , person_id : 1 ) . exists?
1306
+ assert_equal true , StreetAddress . find ( 1 , params : { person_id : 1 } ) . exists?
1307
+ assert_equal false , StreetAddress . new ( id : 1 , person_id : 2 ) . exists?
1308
+ assert_equal false , StreetAddress . new ( id : 2 , person_id : 1 ) . exists?
1309
1309
end
1310
1310
1311
1311
def test_exists_with_redefined_to_param
0 commit comments