Skip to content

Commit

Permalink
Fix assertion value for remoteCustomerId in WCCustomerMapperTest and …
Browse files Browse the repository at this point in the history
…update property assignment in WCCustomerMapper.
  • Loading branch information
kidinov committed Jul 6, 2023
1 parent 00f45a9 commit 116188c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class WCCustomerMapperTest {
assertThat(result.lastName).isEqualTo("lastname")
assertThat(result.email).isEqualTo("email")
assertThat(result.isPayingCustomer).isEqualTo(true)
assertThat(result.remoteCustomerId).isEqualTo(1L)
assertThat(result.remoteCustomerId).isEqualTo(13L)
assertThat(result.dateCreated).isEqualTo("dateRegistered")
assertThat(result.dateModified).isEqualTo("dateLastActive")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class WCCustomerMapper @Inject constructor() {
fun mapToModel(site: SiteModel, dto: CustomerFromAnalyticsDTO): WCCustomerModel {
return WCCustomerModel().apply {
localSiteId = site.id
remoteCustomerId = dto.userId ?: 0
remoteCustomerId = dto.id ?: 0
email = dto.email ?: ""
firstName = dto.name.firstNameFromName()
lastName = dto.name.lastNameFromName()
Expand Down

0 comments on commit 116188c

Please sign in to comment.