@@ -98,6 +98,7 @@ class UsersController extends Controller
|
||||
$user->activated = $request->input('activated', 0);
|
||||
$user->jobtitle = $request->input('jobtitle');
|
||||
$user->phone = $request->input('phone');
|
||||
$user->mobile = $request->input('mobile');
|
||||
$user->location_id = $request->input('location_id', null);
|
||||
$user->department_id = $request->input('department_id', null);
|
||||
$user->company_id = Company::getIdForUser($request->input('company_id', null));
|
||||
@@ -244,6 +245,7 @@ class UsersController extends Controller
|
||||
$user->employee_num = $request->input('employee_num');
|
||||
$user->jobtitle = $request->input('jobtitle', null);
|
||||
$user->phone = $request->input('phone');
|
||||
$user->mobile = $request->input('mobile');
|
||||
$user->location_id = $request->input('location_id', null);
|
||||
$user->company_id = Company::getIdForUser($request->input('company_id', null));
|
||||
$user->manager_id = $request->input('manager_id', null);
|
||||
|
||||
@@ -38,6 +38,7 @@ class UpdateUserTest extends TestCase
|
||||
'permissions' => '{"a.new.permission":"1"}',
|
||||
'activated' => true,
|
||||
'phone' => '619-555-5555',
|
||||
'mobile' => '619-666-6666',
|
||||
'jobtitle' => 'Host',
|
||||
'manager_id' => $manager->id,
|
||||
'employee_num' => '1111',
|
||||
@@ -65,6 +66,7 @@ class UpdateUserTest extends TestCase
|
||||
$this->assertArrayHasKey('a.new.permission', $user->decodePermissions(), 'Permissions were not updated');
|
||||
$this->assertTrue((bool) $user->activated, 'User not marked as activated');
|
||||
$this->assertEquals('619-555-5555', $user->phone, 'Phone was not updated');
|
||||
$this->assertEquals('619-666-6666', $user->mobile, 'Mobile was not updated');
|
||||
$this->assertEquals('Host', $user->jobtitle, 'Job title was not updated');
|
||||
$this->assertTrue($user->manager->is($manager), 'Manager was not updated');
|
||||
$this->assertEquals('1111', $user->employee_num, 'Employee number was not updated');
|
||||
@@ -112,6 +114,7 @@ class UpdateUserTest extends TestCase
|
||||
'permissions' => '{"a.new.permission":"1"}',
|
||||
'activated' => true,
|
||||
'phone' => '619-555-5555',
|
||||
'mobile' => '619-666-6666',
|
||||
'jobtitle' => 'Host',
|
||||
'manager_id' => $manager->id,
|
||||
'employee_num' => '1111',
|
||||
@@ -139,6 +142,7 @@ class UpdateUserTest extends TestCase
|
||||
$this->assertArrayHasKey('a.new.permission', $user->decodePermissions(), 'Permissions were not updated');
|
||||
$this->assertTrue((bool) $user->activated, 'User not marked as activated');
|
||||
$this->assertEquals('619-555-5555', $user->phone, 'Phone was not updated');
|
||||
$this->assertEquals('619-666-6666', $user->mobile, 'Mobile was not updated');
|
||||
$this->assertEquals('Host', $user->jobtitle, 'Job title was not updated');
|
||||
$this->assertTrue($user->manager->is($manager), 'Manager was not updated');
|
||||
$this->assertEquals('1111', $user->employee_num, 'Employee number was not updated');
|
||||
|
||||
Reference in New Issue
Block a user