More tests!

This commit is contained in:
James Cole
2015-01-01 13:43:34 +01:00
parent 402e8588cf
commit 74c9feb53f
5 changed files with 89 additions and 9 deletions

View File

@@ -0,0 +1,30 @@
<?php
use League\FactoryMuffin\Facade as f;
/**
* Class TransactionTypeTest
*/
class TransactionTypeTest extends TestCase
{
public function setUp()
{
parent::setUp();
}
public function tearDown()
{
parent::tearDown();
}
// tests
public function testJournals()
{
$journal = f::create('TransactionJournal');
$type = $journal->transactionType;
$this->assertCount(1, $type->transactionJournals()->get());
}
}

34
tests/unit/UserTest.php Normal file
View File

@@ -0,0 +1,34 @@
<?php
use League\FactoryMuffin\Facade as f;
/**
* Class AccountTest
*/
class UserTest extends TestCase
{
public function setUp()
{
parent::setUp();
}
public function tearDown()
{
parent::tearDown();
}
// tests
public function testPreference()
{
$pref = f::create('Preference');
$this->assertEquals($pref->user_id, $pref->user->id);
}
public function testReminder()
{
$reminder = f::create('Reminder');
$this->assertEquals($reminder->user_id, $reminder->user->id);
}
}