diff --git a/app/database/migrations/2014_11_13_062347_expand_reminders_table.php b/app/database/migrations/2014_11_13_062347_expand_reminders_table.php deleted file mode 100644 index c6e7993b50..0000000000 --- a/app/database/migrations/2014_11_13_062347_expand_reminders_table.php +++ /dev/null @@ -1,33 +0,0 @@ -string('title'); - $table->text('data'); - } - ); - } - -} diff --git a/app/database/migrations/2014_11_15_112449_extend_piggybank_events.php b/app/database/migrations/2014_11_15_112449_extend_piggybank_events.php index 5fc8ea6f96..8b5880c958 100644 --- a/app/database/migrations/2014_11_15_112449_extend_piggybank_events.php +++ b/app/database/migrations/2014_11_15_112449_extend_piggybank_events.php @@ -1,6 +1,7 @@ dropColumn('title'); - $table->dropColumn('data'); $table->integer('remembersable_id')->unsigned()->nullable(); - $table->string('remembersable_type'); + $table->string('remembersable_type')->nullable(); } ); } diff --git a/app/filters.php b/app/filters.php index 3d119c2a3b..de94e1a05e 100644 --- a/app/filters.php +++ b/app/filters.php @@ -4,6 +4,7 @@ App::before( function ($request) { + $reminders = []; if (Auth::check()) { /** @var \FireflyIII\Shared\Toolkit\Filter $toolkit */ @@ -14,9 +15,10 @@ App::before( $reminderKit = App::make('FireflyIII\Shared\Toolkit\Reminders'); $reminderKit->updateReminders(); - View::share('reminders',$reminderKit->getReminders()); + $reminders = $reminderKit->getReminders(); } + View::share('reminders', $reminders); } ); diff --git a/app/models/User.php b/app/models/User.php index 0ce9515e51..e58e572133 100644 --- a/app/models/User.php +++ b/app/models/User.php @@ -42,6 +42,7 @@ class User extends Ardent implements UserInterface, RemindableInterface public static $rules = ['email' => 'required|email|unique:users,email', 'migrated' => 'required|boolean', 'password' => 'required|between:60,60', 'reset' => 'between:32,32',]; + protected $fillable = ['email']; /** * The attributes excluded from the model's JSON form. * diff --git a/app/tests/HomeControllerTest.php b/app/tests/HomeControllerTest.php index 7157067a7a..032ad2669c 100644 --- a/app/tests/HomeControllerTest.php +++ b/app/tests/HomeControllerTest.php @@ -1,4 +1,5 @@ markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->markTestIncomplete('This test has not been implemented yet.'); } /** @@ -43,10 +35,12 @@ class HomeControllerTest extends TestCase */ public function testIndex() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be(new User(['email' => 'test@example.com'])); + + $response = $this->call('GET', '/'); + $this->assertResponseOk(); + + $this->assertTrue(true); } /** @@ -84,4 +78,12 @@ class HomeControllerTest extends TestCase 'This test has not been implemented yet.' ); } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } } diff --git a/app/tests/TestCase.php b/app/tests/TestCase.php index 08770a901e..f38b1effd9 100644 --- a/app/tests/TestCase.php +++ b/app/tests/TestCase.php @@ -15,4 +15,11 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase { $testEnvironment = 'testing'; return require __DIR__.'/../../bootstrap/start.php'; } + + public function setUp() { + parent::setUp(); + Artisan::call('migrate'); + $this->seed(); + //$this-> + } } \ No newline at end of file diff --git a/app/views/partials/menu.blade.php b/app/views/partials/menu.blade.php index 53a8736903..b571ba27b5 100644 --- a/app/views/partials/menu.blade.php +++ b/app/views/partials/menu.blade.php @@ -14,7 +14,7 @@