-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
from
optional for Message and Draft models (#204)
# Description This PR makes the `from` field optional for both messages and drafts, aligning it to the API. # License <!-- Your PR comment must contain the following line for us to merge the PR. --> I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.
- Loading branch information
1 parent
2f99817
commit 42cd063
Showing
5 changed files
with
17 additions
and
17 deletions.
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
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 |
---|---|---|
|
@@ -109,9 +109,9 @@ class DraftsTests { | |
assertEquals(2, draft.folders?.size) | ||
assertEquals("8l6c4d11y1p4dm4fxj52whyr9", draft.folders?.first()) | ||
assertEquals("d9zkcr2tljpu3m4qpj7l2hbr0", draft.folders?.last()) | ||
assertEquals(1, draft.from.size) | ||
assertEquals("Daenerys Targaryen", draft.from.first().name) | ||
assertEquals("[email protected]", draft.from.first().email) | ||
assertEquals(1, draft.from?.size) | ||
assertEquals("Daenerys Targaryen", draft.from?.first()?.name) | ||
assertEquals("[email protected]", draft.from?.first()?.email) | ||
assertEquals("41009df5-bf11-4c97-aa18-b285b5f2e386", draft.grantId) | ||
assertEquals("5d3qmne77v32r8l4phyuksl2x", draft.id) | ||
assertEquals("draft", draft.getObject()) | ||
|
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 |
---|---|---|
|
@@ -108,9 +108,9 @@ class MessagesTests { | |
assertEquals(2, message.folders?.size) | ||
assertEquals("8l6c4d11y1p4dm4fxj52whyr9", message.folders?.get(0)) | ||
assertEquals("d9zkcr2tljpu3m4qpj7l2hbr0", message.folders?.get(1)) | ||
assertEquals(1, message.from.size) | ||
assertEquals("Daenerys Targaryen", message.from[0].name) | ||
assertEquals("[email protected]", message.from[0].email) | ||
assertEquals(1, message.from?.size) | ||
assertEquals("Daenerys Targaryen", message.from?.get(0)?.name) | ||
assertEquals("[email protected]", message.from?.get(0)?.email) | ||
assertEquals("41009df5-bf11-4c97-aa18-b285b5f2e386", message.grantId) | ||
assertEquals("5d3qmne77v32r8l4phyuksl2x", message.id) | ||
assertEquals("message", message.getObject()) | ||
|