mirror of
https://github.com/snipe/snipe-it.git
synced 2026-08-18 11:15:42 +00:00
Rename company_id on users table
This commit is contained in:
@ -13,7 +13,7 @@ trait ProvidesDataForFullMultipleCompanySupportTesting
|
||||
yield "User in a company should result in user's company_id being used" => [
|
||||
function () {
|
||||
$jedi = Company::factory()->create();
|
||||
$luke = User::factory()->for($jedi)
|
||||
$luke = User::factory()->forCompany($jedi)
|
||||
->createAccessories()
|
||||
->createAssets()
|
||||
->createComponents()
|
||||
@ -35,12 +35,13 @@ trait ProvidesDataForFullMultipleCompanySupportTesting
|
||||
yield 'User without a company should result in company_id being null' => [
|
||||
function () {
|
||||
$userInNoCompany = User::factory()
|
||||
->withoutCompany()
|
||||
->createAccessories()
|
||||
->createAssets()
|
||||
->createComponents()
|
||||
->createConsumables()
|
||||
->createLicenses()
|
||||
->create(['company_id' => null]);
|
||||
->create();
|
||||
|
||||
return [
|
||||
'actor' => $userInNoCompany,
|
||||
@ -54,7 +55,7 @@ trait ProvidesDataForFullMultipleCompanySupportTesting
|
||||
|
||||
yield 'Super-User assigning across companies should result in company_id being set to what was provided' => [
|
||||
function () {
|
||||
$superUser = User::factory()->superuser()->create(['company_id' => null]);
|
||||
$superUser = User::factory()->superuser()->withoutCompany()->create();
|
||||
$company = Company::factory()->create();
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user