mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-02-25 18:45:27 -06:00 
			
		
		
		
	Fix currency mapper test
This commit is contained in:
		@@ -27,8 +27,8 @@ namespace Tests\Unit\Support\Import\Routine\File;
 | 
				
			|||||||
use FireflyIII\Models\TransactionCurrency;
 | 
					use FireflyIII\Models\TransactionCurrency;
 | 
				
			||||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
 | 
					use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
 | 
				
			||||||
use FireflyIII\Support\Import\Routine\File\CurrencyMapper;
 | 
					use FireflyIII\Support\Import\Routine\File\CurrencyMapper;
 | 
				
			||||||
use Tests\TestCase;
 | 
					 | 
				
			||||||
use Log;
 | 
					use Log;
 | 
				
			||||||
 | 
					use Tests\TestCase;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Class CurrencyMapperTest
 | 
					 * Class CurrencyMapperTest
 | 
				
			||||||
@@ -111,13 +111,13 @@ class CurrencyMapperTest extends TestCase
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // nothing found, mapper will try to create it.
 | 
					        // nothing found, mapper will try to create it.
 | 
				
			||||||
        $repository->shouldReceive('store')
 | 
					        $repository->shouldReceive('store')
 | 
				
			||||||
                   ->withArgs([['code' => $currency->code, 'name' => $currency->name, 'symbol' => $currency->symbol, 'decimal_places' => 2]])
 | 
					                   ->withArgs([['code' => $currency->code, 'name' => $currency->name, 'symbol' => $currency->symbol, 'enabled' => true, 'decimal_places' => 2]])
 | 
				
			||||||
                   ->once()->andReturn($currency);
 | 
					                   ->once()->andReturn($currency);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $mapper = new CurrencyMapper();
 | 
					        $mapper = new CurrencyMapper();
 | 
				
			||||||
        $mapper->setUser($this->user());
 | 
					        $mapper->setUser($this->user());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $result = $mapper->map(null, ['name' => $currency->name, 'code' => $currency->code, 'symbol' => $currency->symbol]);
 | 
					        $result = $mapper->map(null, ['name' => $currency->name, 'code' => $currency->code, 'enabled' => true, 'symbol' => $currency->symbol]);
 | 
				
			||||||
        $this->assertEquals($currency->id, $result->id);
 | 
					        $this->assertEquals($currency->id, $result->id);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user