mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Some simple renames for better readability as suggested by Marcus
This commit is contained in:
parent
67a8e0b5c6
commit
266424ff0e
|
@ -353,9 +353,9 @@ class AssetFactory extends Factory
|
||||||
return $this->state(['requestable' => false]);
|
return $this->state(['requestable' => false]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function has_encrypted_custom_field()
|
public function hasEncryptedCustomField()
|
||||||
{
|
{
|
||||||
return $this->state(['model_id' => AssetModel::where('name', 'asset with encrypted field')->first() ?? AssetModel::factory()->encrypted_field()]);
|
return $this->state(['model_id' => AssetModel::where('name', 'asset with encrypted field')->first() ?? AssetModel::factory()->withEncryptedField()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -431,7 +431,7 @@ class AssetModelFactory extends Factory
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function encrypted_field()
|
public function withEncryptedField()
|
||||||
{
|
{
|
||||||
return $this->state(function () {
|
return $this->state(function () {
|
||||||
$field = CustomField::factory()->testEncrypted()->create(); // TODO - having to create and then 'find' the thing you just created is WEIRD
|
$field = CustomField::factory()->testEncrypted()->create(); // TODO - having to create and then 'find' the thing you just created is WEIRD
|
||||||
|
|
|
@ -485,7 +485,7 @@ class AssetStoreTest extends TestCase
|
||||||
public function testEncryptedCustomField()
|
public function testEncryptedCustomField()
|
||||||
{
|
{
|
||||||
$field = CustomField::factory()->testEncrypted()->create();
|
$field = CustomField::factory()->testEncrypted()->create();
|
||||||
$asset = Asset::factory()->has_encrypted_custom_field()->create();
|
$asset = Asset::factory()->hasEncryptedCustomField()->create();
|
||||||
$superuser = User::factory()->superuser()->create();
|
$superuser = User::factory()->superuser()->create();
|
||||||
$normal_user = User::factory()->editAssets()->create();
|
$normal_user = User::factory()->editAssets()->create();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue