added tests for Model.findByPk

added tests for Model.findByPk
This commit is contained in:
ben
2018-11-08 09:29:42 -06:00
committed by GitHub
parent 41c1ba2436
commit 09fe13180e
+4
View File
@@ -981,6 +981,10 @@ User.findByPrimary( 'a string' );
User.findByPrimary( 42 );
User.findByPrimary( Buffer.from('a buffer') );
User.findByPk( 'a string' );
User.findByPk( 42 );
User.findByPk( Buffer.from('a buffer') );
User.findOne( { where : { username : 'foo' } } );
User.findOne( { where : { id : 1 }, attributes : ['id', ['username', 'name']] } );
User.findOne( { where : { id : 1 }, attributes : ['id'] } );