When testing Models, it can be a bit confusing where to start. But a great way to start is to test the attributes available in your Model. For this, I suggest the following. (Note that this example requires Jeffery Way's Laravel Test Helpers
// app/tests/ModelTestCase
<?php
class ModelTestCase extends TestCase
{
public function assertArrayHasKeys(array $keys, array $array, $message = null)
{
foreach ($keys as $key) {
$this->assertArrayHasKey($key, $array, $message);
}
}
}
// app/YourModelTest
use Way\Tests\Factory;
public function test_attributesInModel()
{
$model = Factory::make('Model');
$this->assertArrayHasKeys(array('every', 'attribute', 'you', 'want', 'in', 'your', 'model'), $model->toArray());
}
This then will check your database schema and your mutators for settings. More advanced cases may not be valid, but this will at least get the ball rolling!