mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Mark custom fields tests as 'incomplete' if the DB is mysql
This commit is contained in:
parent
60a5afd752
commit
ab45975883
|
@ -482,8 +482,16 @@ class AssetStoreTest extends TestCase
|
|||
});
|
||||
}
|
||||
|
||||
public function markIncompleteIfMySQL()
|
||||
{
|
||||
if (config('database.default') === 'mysql') {
|
||||
$this->markTestIncomplete('Custom Fields tests do not work on MySQL');
|
||||
}
|
||||
}
|
||||
|
||||
public function testEncryptedCustomFieldCanBeStored()
|
||||
{
|
||||
$this->markIncompleteIfMySQL();
|
||||
$status = Statuslabel::factory()->create();
|
||||
$field = CustomField::factory()->testEncrypted()->create();
|
||||
$superuser = User::factory()->superuser()->create();
|
||||
|
|
|
@ -10,8 +10,18 @@ use Tests\TestCase;
|
|||
|
||||
class AssetUpdateTest extends TestCase
|
||||
{
|
||||
// TODO - this 'helper' is duplicated in AssetStoreTest - we should extract it out if we can figure out how
|
||||
public function markIncompleteIfMySQL()
|
||||
{
|
||||
if (config('database.default') === 'mysql') {
|
||||
$this->markTestIncomplete('Custom Fields tests do not work on MySQL');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function testEncryptedCustomFieldCanBeUpdated()
|
||||
{
|
||||
$this->markIncompleteIfMySQL();
|
||||
$field = CustomField::factory()->testEncrypted()->create();
|
||||
$asset = Asset::factory()->hasEncryptedCustomField($field)->create();
|
||||
$superuser = User::factory()->superuser()->create();
|
||||
|
@ -29,6 +39,7 @@ class AssetUpdateTest extends TestCase
|
|||
|
||||
public function testPermissionNeededToUpdateEncryptedField()
|
||||
{
|
||||
$this->markIncompleteIfMySQL();
|
||||
$field = CustomField::factory()->testEncrypted()->create();
|
||||
$asset = Asset::factory()->hasEncryptedCustomField($field)->create();
|
||||
$normal_user = User::factory()->editAssets()->create();
|
||||
|
|
Loading…
Reference in a new issue