-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { depopulateCard } from "./cardApi"; | ||
|
||
it("should clean up referenced members", function() { | ||
const card = { | ||
_id: "5d6aa2c0b3c3b66d9e80ceb6", | ||
number: "#8", | ||
title: "hold how", | ||
description: | ||
"Id fugiat et aliqua nisi. Ea laborum dolor exercitation sit. Veniam ea dolore ad est ad anim excepteur. Eiusmod magna aliquip duis. Anim deserunt dolor eu velit eiusmod aliquip eu consectetur Lorem.", | ||
status: "", | ||
board: "", | ||
comments: "", | ||
activity: "", | ||
attachments: "", | ||
owner: { | ||
_id: "5d42e5d5e1e3d731df26010a", | ||
firstName: "Andrew", | ||
lastName: "Smith" | ||
}, | ||
members: [ | ||
{ | ||
_id: "5d42104a7979bd071c129606", | ||
firstName: "Dale", | ||
lastName: "Fitzgerald" | ||
}, | ||
{ | ||
_id: "5d42104a7979bd071c129609", | ||
firstName: "Adeline", | ||
lastName: "Fitzgerald" | ||
} | ||
], | ||
createdDate: "2019-08-31T16:39:28.780Z", | ||
modifiedDate: "2019-08-31T16:39:28.780Z" | ||
}; | ||
|
||
expect(depopulateCard(card).members).toEqual([ | ||
"5d42104a7979bd071c129606", | ||
"5d42104a7979bd071c129609" | ||
]); | ||
}); |