3
0
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:
snipe
2026-07-10 14:41:47 +01:00
parent 2d1023162a
commit 115d1a4f5e
87 changed files with 607 additions and 337 deletions

View File

@ -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 [