@ -30,10 +30,12 @@ describe('controller calls', () => {
queue . after ( ) ;
controller . after ( ) ;
} ) ;
it ( 'get on going rating' , ( ) => {
it ( 'get out going rating' , ( ) => {
queue . respondWith ( { "jsonrpc" : "2.0" , "id" : 3 , "result" : { "outParams" : [ { "rating" : 3 } ] , "return" : { "status" : 0 , "hex" : "0 \"PEP_STATUS_OK\"" } , "errorstack" : [ "(1 elements cleared)" ] } } ) ;
let result = controller . getOngoingRating ( "cfg@pep.security" , [ "cfg@pep.security" , "hk@pep.security" ] ) ;
queue . expectSent ( { "security_token" : "0847cqi9WqqE5ZcVtA8_mDIgEmYMv14xlNAvSZW" , "method" : "outgoing_message_rating" , "params" : [ { "id" : "pEp-0" , "shortmsg" : "test" , "longmsg" : "test" , "from" : { "user_id" : "" , "username" : "anonymous" , "address" : "cfg@pep.security" , "fpr" : "" } , "to" : [ { "user_id" : "" , "username" : "anonymous" , "address" : "cfg@pep.security" , "fpr" : "" } , { "user_id" : "" , "username" : "anonymous" , "address" : "hk@pep.security" , "fpr" : "" } ] , "dir" : 1 , "enc_format" : 3 , "attachments" : [ ] , "opt_fields" : [ ] } , "0" ] , "id" : 1 , "jsonrpc" : "2.0" } ) ;
let result = controller . getOutgoingRating ( "cfg@pep.security" , [ "cfg@pep.security" , "hk@pep.security" ] ) ;
queue . expectSent (
{ "security_token" : "0847cqi9WqqE5ZcVtA8_mDIgEmYMv14xlNAvSZW" , "method" : "outgoing_message_rating" , "params" : [ { "dir" : 1 , "id" : "pEp-0" , "shortmsg" : "test" , "longmsg" : "test" , "attachments" : [ ] , "rawmsg_ref" : "" , "rawmsg_size" : "" , "from" : { "user_id" : "" , "username" : "" , "address" : "cfg@pep.security" , "fpr" : "" } , "to" : [ { "user_id" : "" , "username" : "" , "address" : "cfg@pep.security" , "fpr" : "" } , { "user_id" : "" , "username" : "" , "address" : "hk@pep.security" , "fpr" : "" } ] , "in_reply_to" : [ ] , "opt_fields" : [ ] , "enc_format" : 4 } , "0" ] , "id" : 1 , "jsonrpc" : "2.0" }
) ;
return result . should . become ( 3 ) ;
} ) ;
it ( 'myself' , ( ) => {
@ -175,6 +177,7 @@ describe('controller calls', () => {
return result . should . become ( [ ] ) ;
} ) ;
} ) ;
/ * D i s c l a i m e r f u n c t i o n a l i t y w a s r e m o v e d f o r n o w .
describe ( 'appends the disclaimer, P4TB-131' , ( ) => {
it ( 'to unencrypted messages' , ( ) => {
controller . setPrefs ( {
@ -221,4 +224,5 @@ describe('controller calls', () => {
return expect ( prom ) . to . eventually . have . property ( "longmsg" , "body" ) ;
} ) ;
} ) ;
* /
} ) ;