mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
CE-882 Add Disabled test that's failing... needs fixed!
This commit is contained in:
@ -56,6 +56,7 @@ import com.kingsrook.qqq.backend.module.rdbms.sharing.model.Group;
|
||||
import com.kingsrook.qqq.backend.module.rdbms.sharing.model.SharedAsset;
|
||||
import com.kingsrook.qqq.backend.module.rdbms.sharing.model.User;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static com.kingsrook.qqq.backend.module.rdbms.sharing.SharingMetaDataProvider.GROUP_ID_ALL_ACCESS_KEY_TYPE;
|
||||
import static com.kingsrook.qqq.backend.module.rdbms.sharing.SharingMetaDataProvider.GROUP_ID_KEY_TYPE;
|
||||
@ -481,4 +482,33 @@ public class SharingTest
|
||||
assertThat(insertOutput.getRecords().get(0).getErrors()).isEmpty();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
*******************************************************************************/
|
||||
@Test
|
||||
@Disabled("This needs fixed, but we're committing as-we are to move forwards")
|
||||
void testUpdateAsset() throws QException
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
// make sure we can't update an Asset if we don't have a key that would let us see it //
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
{
|
||||
QContext.getQSession().withSecurityKeyValues(new HashMap<>());
|
||||
UpdateOutput updateOutput = new UpdateAction().execute(new UpdateInput(Asset.TABLE_NAME).withRecord(new QRecord().withValue("id", 1).withValue("modifyDate", Instant.now())));
|
||||
assertThat(updateOutput.getRecords().get(0).getErrors()).isNotEmpty();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////
|
||||
// and if we do have a key, we can update it //
|
||||
///////////////////////////////////////////////
|
||||
{
|
||||
QContext.getQSession().withSecurityKeyValues(new HashMap<>());
|
||||
QContext.getQSession().withSecurityKeyValue(USER_ID_KEY_TYPE, HOMER_ID);
|
||||
UpdateOutput updateOutput = new UpdateAction().execute(new UpdateInput(Asset.TABLE_NAME).withRecord(new QRecord().withValue("id", 1).withValue("modifyDate", Instant.now())));
|
||||
assertThat(updateOutput.getRecords().get(0).getErrors()).isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user