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:
12
app/Role.php
12
app/Role.php
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user