Skip to content

Commit

Permalink
Allow updating of contact groups' InternetAccount
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstyl committed Feb 26, 2023
1 parent 8bbb765 commit b23bdf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ internal class EditGroupTest : ContactStoreTestBase() {
val group = buildStoreContactGroup {
note = "Note"
title = "GroupTitle"
account = null
}
val updatedCopy = group.mutableCopy {
note = "Updated Note"
title = "Updated Title"
account = InternetAccount("[email protected]", "test.com")
}
store.execute {
updateGroup(updatedCopy)
Expand All @@ -49,6 +51,7 @@ internal class EditGroupTest : ContactStoreTestBase() {
title = "Updated Title",
contactCount = 0,
note = "Updated Note",
account = InternetAccount("[email protected]", "test.com")
)

assertThat(actual, samePropertiesAs(expected))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ internal class GroupOperationsFactory {
newUpdate(Groups.CONTENT_URI)
.withValue(Groups.TITLE, group.title)
.withValue(Groups.NOTES, group.note)
.withValue(Groups.ACCOUNT_TYPE, group.account?.type)
.withValue(Groups.ACCOUNT_NAME, group.account?.name)
.withSelection("${Groups._ID} = ${group.groupId}", null)
.build()
)
Expand Down

0 comments on commit b23bdf3

Please sign in to comment.