diff --git a/src/app/shared/remote-data.utils.ts b/src/app/shared/remote-data.utils.ts index ce278e0229..580b68673b 100644 --- a/src/app/shared/remote-data.utils.ts +++ b/src/app/shared/remote-data.utils.ts @@ -69,3 +69,24 @@ export function createPendingRemoteDataObject(object?: T): RemoteData { export function createPendingRemoteDataObject$(object?: T): Observable> { return observableOf(createPendingRemoteDataObject(object)); } + +/** + * Method to create a remote data object with no content + */ +export function createNoContentRemoteDataObject(): RemoteData { + return new RemoteData( + true, + true, + true, + null, + null, + 204 + ); +} + +/** + * Method to create a remote data object that has succeeded with no content, wrapped in an observable + */ +export function createNoContentRemoteDataObject$(): Observable> { + return observableOf(createNoContentRemoteDataObject()); +}