1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { isProjectTrashed } from './side-panel-button';
7 describe('<SidePanelButton />', () => {
8 describe('isProjectTrashed', () => {
9 it('should return false if project is undefined', () => {
11 const proj = undefined;
15 const result = isProjectTrashed(proj, resources);
18 expect(result).toBeFalsy();
21 it('should return false if parent project is undefined', () => {
27 const result = isProjectTrashed(proj, resources);
30 expect(result).toBeFalsy();
33 it('should return false for owner', () => {
36 ownerUuid: 'ce8i5-tpzed-000000000000000',
41 const result = isProjectTrashed(proj, resources);
44 expect(result).toBeFalsy();
47 it('should return true for trashed', () => {
55 const result = isProjectTrashed(proj, resources);
58 expect(result).toBeTruthy();
61 it('should return false for undefined parent projects', () => {
64 ownerUuid: 'ce8i5-j7d0g-000000000000000',
69 const result = isProjectTrashed(proj, resources);
72 expect(result).toBeFalsy();