File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 55use  Bavix \Wallet \Interfaces \Rateable ;
66use  Bavix \Wallet \Services \ExchangeService ;
77use  Bavix \Wallet \Test \Models \UserMulti ;
8+ use  Illuminate \Support \Str ;
89
910class  RateTest extends  TestCase
1011{
@@ -30,6 +31,12 @@ public function testRate(): void
3031        $ this  ->assertEquals ($ rub ->holder_id , $ user ->id );
3132        $ this  ->assertInstanceOf ($ rub ->holder_type , $ user );
3233
34+         $ superWallet  = $ user ->createWallet (['name '  => 'Super Wallet ' ]);
35+         $ this  ->assertEquals ($ superWallet ->slug , Str::slug ('Super Wallet ' ));
36+         $ this  ->assertEquals ($ superWallet ->currency , Str::upper (Str::slug ('Super Wallet ' )));
37+         $ this  ->assertEquals ($ superWallet ->holder_id , $ user ->id );
38+         $ this  ->assertInstanceOf ($ superWallet ->holder_type , $ user );
39+ 
3340        $ rate  = app (Rateable::class)
3441            ->withAmount (1000 )
3542            ->withCurrency ($ usd )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments