1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Added more tests to increase test coverage

This commit is contained in:
Dan Brown
2016-01-02 14:48:35 +00:00
parent f60a0c3b76
commit d3709de035
10 changed files with 97 additions and 33 deletions

View File

@ -43,6 +43,16 @@ class Role extends Model
*/
public static function getDefault()
{
return static::where('name', '=', static::$default)->first();
return static::getRole(static::$default);
}
/**
* Get the role object for the specified role.
* @param $roleName
* @return mixed
*/
public static function getRole($roleName)
{
return static::where('name', '=', $roleName)->first();
}
}