mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 17:14:10 -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()
|
public function testEncryptedCustomFieldCanBeStored()
|
||||||
{
|
{
|
||||||
|
$this->markIncompleteIfMySQL();
|
||||||
$status = Statuslabel::factory()->create();
|
$status = Statuslabel::factory()->create();
|
||||||
$field = CustomField::factory()->testEncrypted()->create();
|
$field = CustomField::factory()->testEncrypted()->create();
|
||||||
$superuser = User::factory()->superuser()->create();
|
$superuser = User::factory()->superuser()->create();
|
||||||
|
|
|
@ -10,8 +10,18 @@ use Tests\TestCase;
|
||||||
|
|
||||||
class AssetUpdateTest extends 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()
|
public function testEncryptedCustomFieldCanBeUpdated()
|
||||||
{
|
{
|
||||||
|
$this->markIncompleteIfMySQL();
|
||||||
$field = CustomField::factory()->testEncrypted()->create();
|
$field = CustomField::factory()->testEncrypted()->create();
|
||||||
$asset = Asset::factory()->hasEncryptedCustomField($field)->create();
|
$asset = Asset::factory()->hasEncryptedCustomField($field)->create();
|
||||||
$superuser = User::factory()->superuser()->create();
|
$superuser = User::factory()->superuser()->create();
|
||||||
|
@ -29,6 +39,7 @@ class AssetUpdateTest extends TestCase
|
||||||
|
|
||||||
public function testPermissionNeededToUpdateEncryptedField()
|
public function testPermissionNeededToUpdateEncryptedField()
|
||||||
{
|
{
|
||||||
|
$this->markIncompleteIfMySQL();
|
||||||
$field = CustomField::factory()->testEncrypted()->create();
|
$field = CustomField::factory()->testEncrypted()->create();
|
||||||
$asset = Asset::factory()->hasEncryptedCustomField($field)->create();
|
$asset = Asset::factory()->hasEncryptedCustomField($field)->create();
|
||||||
$normal_user = User::factory()->editAssets()->create();
|
$normal_user = User::factory()->editAssets()->create();
|
||||||
|
|
Loading…
Reference in a new issue