@@ -7,7 +7,7 @@ use std::sync::{Arc, OnceLock};
77
88use anyhow:: Result ;
99use mockall:: predicate;
10- use secrecy:: { ExposeSecret , Secret } ;
10+ use secrecy:: { ExposeSecret , SecretString } ;
1111
1212use prose_core_client:: app:: deps:: DynAppContext ;
1313use prose_core_client:: app:: services:: ConnectionService ;
@@ -65,7 +65,7 @@ async fn test_starts_available_and_generates_resource() -> Result<()> {
6565 . once ( )
6666 . with (
6767 predicate
:: eq ( user_resource_id ! ( "[email protected] /resource-id" ) ) , 68- predicate:: function ( |pw : & Secret < String > | pw. expose_secret ( ) . as_str ( ) == "my-password" ) ,
68+ predicate:: function ( |pw : & SecretString | pw. expose_secret ( ) == "my-password" ) ,
6969 )
7070 . return_once ( |_, _| Box :: pin ( async { Ok ( Default :: default ( ) ) } ) ) ;
7171 deps. contact_list_domain_service
@@ -138,10 +138,7 @@ async fn test_starts_available_and_generates_resource() -> Result<()> {
138138 assert ! ( deps. ctx. muc_service( ) . is_err( ) ) ;
139139
140140 service
141- . connect (
142- 143- Secret :: new ( "my-password" . to_string ( ) ) ,
144- )
141+ . connect ( & user_id ! ( "[email protected] " ) , "my-password" . into ( ) ) 145142 . await ?;
146143
147144 assert_eq ! (
@@ -268,10 +265,7 @@ async fn test_restores_availability_and_resource() -> Result<()> {
268265 let service = ConnectionService :: from ( & deps) ;
269266
270267 service
271- . connect (
272- 273- Secret :: new ( "my-password" . to_string ( ) ) ,
274- )
268+ . connect ( & user_id ! ( "[email protected] " ) , "my-password" . into ( ) ) 275269 . await ?;
276270
277271 Ok ( ( ) )
@@ -325,10 +319,7 @@ async fn test_connection_failure() -> Result<()> {
325319 assert ! ( deps. ctx. muc_service( ) . is_err( ) ) ;
326320
327321 assert ! ( service
328- . connect(
329- 330- Secret :: new( "my-password" . to_string( ) )
331- )
322+ . connect
( & user_id!
( "[email protected] " ) , "my-password" . into
( ) ) 332323 . await
333324 . is_err( ) ) ;
334325
0 commit comments