Skip to content

Commit

Permalink
ECWID-138355 refactored: search customer by keyword after searching b…
Browse files Browse the repository at this point in the history
…y name and email
  • Loading branch information
qblake committed May 14, 2024
1 parent 461b194 commit c9201e6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/test/kotlin/com/ecwid/apiclient/v3/entity/CustomersTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ class CustomersTest : BaseEntityTest() {
assertTrue(orderCreateResult.id > 0)

// Trying to search by different fields

assertCustomersSearch(
positiveCustomerId = customerCreateResult.id,
positiveSearchRequest = CustomersSearchRequest(keyword = customerCreateRequest.newCustomer.billingPerson?.name),
negativeSearchRequest = CustomersSearchRequest(keyword = customerCreateRequest.newCustomer.billingPerson?.name + "foo")
)

assertCustomersSearch(
positiveCustomerId = customerCreateResult.id,
positiveSearchRequest = CustomersSearchRequest(name = customerCreateRequest.newCustomer.billingPerson?.name),
Expand All @@ -171,6 +164,12 @@ class CustomersTest : BaseEntityTest() {
negativeSearchRequest = CustomersSearchRequest(email = customerCreateRequest.newCustomer.email + "foo")
)

assertCustomersSearch(
positiveCustomerId = customerCreateResult.id,
positiveSearchRequest = CustomersSearchRequest(keyword = customerCreateRequest.newCustomer.billingPerson?.name),
negativeSearchRequest = CustomersSearchRequest(keyword = customerCreateRequest.newCustomer.billingPerson?.name + "foo")
)

assertCustomersSearch(
positiveCustomerId = customerCreateResult.id,
positiveSearchRequest = CustomersSearchRequest(customerGroupId = customerCreateRequest.newCustomer.customerGroupId),
Expand Down

0 comments on commit c9201e6

Please sign in to comment.