Correct order of arguments

This commit is contained in:
Marcus Moore 2024-04-16 10:51:33 -07:00
parent 870612be1c
commit eefe377159
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -498,7 +498,7 @@ class AssetStoreTest extends TestCase
->assertOk()
->json();
$asset->refresh();
$this->assertEquals(\Crypt::decrypt($asset->{$field->db_column_name()}), 'This is encrypted field');
$this->assertEquals('This is encrypted field', \Crypt::decrypt($asset->{$field->db_column_name()}));
//next, test that a 'normal' user *cannot* change the encrypted custom field
$response = $this->actingAsForApi($normal_user)
@ -510,7 +510,7 @@ class AssetStoreTest extends TestCase
->assertMessagesAre('Asset updated successfully, but encrypted custom fields were not due to permissions')
->json();
$asset->refresh();
$this->assertEquals(\Crypt::decrypt($asset->{$field->db_column_name()}), 'This is encrypted field');
$this->assertEquals('This is encrypted field', \Crypt::decrypt($asset->{$field->db_column_name()}));
}
}

View file

@ -31,7 +31,7 @@ class AssetUpdateTest extends TestCase
->assertOk()
->json();
$asset->refresh();
$this->assertEquals(\Crypt::decrypt($asset->{$field->db_column_name()}), 'This is encrypted field');
$this->assertEquals('This is encrypted field', \Crypt::decrypt($asset->{$field->db_column_name()}));
}
public function testPermissionNeededToUpdateEncryptedField()
@ -53,7 +53,7 @@ class AssetUpdateTest extends TestCase
->assertMessagesAre('Asset updated successfully, but encrypted custom fields were not due to permissions')
->json();
$asset->refresh();
$this->assertEquals(\Crypt::decrypt($asset->{$field->db_column_name()}), "encrypted value should not change");
$this->assertEquals("encrypted value should not change", \Crypt::decrypt($asset->{$field->db_column_name()}));
}
}