Skip to content

Commit

Permalink
Some simple renames for better readability as suggested by Marcus
Browse files Browse the repository at this point in the history
  • Loading branch information
uberbrady committed Apr 16, 2024
1 parent 67a8e0b commit 266424f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions database/factories/AssetFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,9 @@ public function nonrequestable()
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()]);
}


Expand Down
2 changes: 1 addition & 1 deletion database/factories/AssetModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public function ultrasharp()
});
}

public function encrypted_field()
public function withEncryptedField()
{
return $this->state(function () {
$field = CustomField::factory()->testEncrypted()->create(); // TODO - having to create and then 'find' the thing you just created is WEIRD
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/Api/Assets/AssetStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public function testCompanyIdNeedsToBeInteger()
public function testEncryptedCustomField()
{
$field = CustomField::factory()->testEncrypted()->create();
$asset = Asset::factory()->has_encrypted_custom_field()->create();
$asset = Asset::factory()->hasEncryptedCustomField()->create();
$superuser = User::factory()->superuser()->create();
$normal_user = User::factory()->editAssets()->create();

Expand Down

0 comments on commit 266424f

Please sign in to comment.