mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Code cleanup.
This commit is contained in:
		| @@ -76,7 +76,7 @@ class AccountModelTest extends TestCase | ||||
|             'name'            => 'Some new account', | ||||
|             'account_type_id' => $account->account_type_id, | ||||
|             'user_id'         => $account->user_id, | ||||
|             'active' => 1, | ||||
|             'active'          => 1, | ||||
|         ]; | ||||
|  | ||||
|         $result = Account::firstOrCreateEncrypted($search); | ||||
| @@ -125,7 +125,7 @@ class AccountModelTest extends TestCase | ||||
|             'name'            => 'Some new account', | ||||
|             'account_type_id' => $account->account_type_id, | ||||
|             'user_id'         => $account->user_id, | ||||
|             'active' => 1, | ||||
|             'active'          => 1, | ||||
|         ]; | ||||
|  | ||||
|         $result = Account::firstOrNullEncrypted($search); | ||||
|   | ||||
| @@ -38,24 +38,6 @@ class TagModelTest extends TestCase | ||||
|         parent::tearDown(); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Models\Tag::firstOrCreateEncrypted | ||||
|      */ | ||||
|     public function testFirstOrCreateEncryptedNew() | ||||
|     { | ||||
|         $tag = FactoryMuffin::create('FireflyIII\Models\Tag'); | ||||
|  | ||||
|         $search = [ | ||||
|             'tagMode' => 'something', | ||||
|             'tag'     => 'Something else', | ||||
|             'user_id' => $tag->user_id, | ||||
|         ]; | ||||
|  | ||||
|         $result = Tag::firstOrCreateEncrypted($search); | ||||
|  | ||||
|         $this->assertNotEquals($tag->id, $result->id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Models\Tag::firstOrCreateEncrypted | ||||
|      */ | ||||
| @@ -74,4 +56,22 @@ class TagModelTest extends TestCase | ||||
|         $this->assertEquals($tag->id, $result->id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Models\Tag::firstOrCreateEncrypted | ||||
|      */ | ||||
|     public function testFirstOrCreateEncryptedNew() | ||||
|     { | ||||
|         $tag = FactoryMuffin::create('FireflyIII\Models\Tag'); | ||||
|  | ||||
|         $search = [ | ||||
|             'tagMode' => 'something', | ||||
|             'tag'     => 'Something else', | ||||
|             'user_id' => $tag->user_id, | ||||
|         ]; | ||||
|  | ||||
|         $result = Tag::firstOrCreateEncrypted($search); | ||||
|  | ||||
|         $this->assertNotEquals($tag->id, $result->id); | ||||
|     } | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -324,7 +324,7 @@ class TransactionJournalModelTest extends TestCase | ||||
|         // make accounts | ||||
|         $expense = FactoryMuffin::create('FireflyIII\Models\Account'); | ||||
|         FactoryMuffin::create('FireflyIII\Models\Account'); | ||||
|         $asset   = FactoryMuffin::create('FireflyIII\Models\Account'); | ||||
|         $asset = FactoryMuffin::create('FireflyIII\Models\Account'); | ||||
|  | ||||
|         Transaction::create(['account_id' => $expense->id, 'transaction_journal_id' => $withdrawal->id, 'amount' => 300]); | ||||
|         Transaction::create(['account_id' => $asset->id, 'transaction_journal_id' => $withdrawal->id, 'amount' => -300]); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user