Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class MdxOnDemandMdxListSerializerTest extends MockeryAndSessionRepository {
given:
subject = new MdxOnDemandMdxListSerializer(
new MixinDefinition(Account, AccountXmlMixin)
)
)

def transactions = new MdxList<Account>()
transactions.add(new Account().tap {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ProductControllerTest extends Specification {
new Product().tap {
challenges = [new Challenge()]
}
)
)

when:
doReturn(mockResponse).when(productGateway).get(productId)
Expand Down Expand Up @@ -133,7 +133,7 @@ class ProductControllerTest extends Specification {
new Product().tap {
challenges = [new Challenge()]
}
)
)

when:
doReturn(mockResponse).when(productGateway).update(productId, product)
Expand Down Expand Up @@ -169,7 +169,7 @@ class ProductControllerTest extends Specification {
new Product().tap {
challenges = [new Challenge()]
}
).withStatus(PathResponseStatus.OK)
).withStatus(PathResponseStatus.OK)

when:
doReturn(mockResponse).when(productGateway).update(productId, product)
Expand All @@ -188,7 +188,7 @@ class ProductControllerTest extends Specification {
new Product().tap {
challenges = [new Challenge()]
}
)
)

when:
doReturn(mockResponse).when(productGateway).update(productId, product)
Expand Down Expand Up @@ -252,7 +252,7 @@ class ProductControllerTest extends Specification {
new Product().tap {
challenges = [new Challenge()]
}
).withStatus(PathResponseStatus.OK)
).withStatus(PathResponseStatus.OK)

when:
doReturn(mockResponse).when(productGateway).get(productId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class ProfilesControllerTest extends Specification {
new ChallengeQuestions().tap {
setChallenges(new MdxList<Challenge>().tap { add(new Challenge()) })
}
)
)

doReturn(mockResponse).when(challengeQuestionGateway).update(any())

Expand All @@ -240,7 +240,7 @@ class ProfilesControllerTest extends Specification {
setChallenges(new MdxList<Challenge>().tap { add(new Challenge()) })
setQuestionList(new Challenge())
}
)
)

doReturn(mockResponse).when(securityQuestionGateway).update(any())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class RecurringTransfersControllerTest extends Specification implements WithMock
new RecurringTransfer().tap {
setChallenges(new MdxList<Challenge>().tap { add(new Challenge()) })
}
)
)

when:
Mockito.doReturn(mockResponse).when(recurringTransferGateway).create(transfer)
Expand Down Expand Up @@ -147,7 +147,7 @@ class RecurringTransfersControllerTest extends Specification implements WithMock
new RecurringTransfer().tap {
setChallenges(new MdxList<Challenge>().tap { add(new Challenge()) })
}
)
)

when:
Mockito.doReturn(mockResponse).when(recurringTransferGateway).update("id", transfer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ class MdxRealtimeMembersConnectionTest extends Mockery {
expectConnection(withPath("/clientId/users/userId/members.json")
.withMatcher { request ->
return request.body == "{\n" +
" \"member\": {\n" +
" \"id\": \"memberId\",\n" +
" \"userkey\": \"userKey\"\n" +
" }\n" +
"}"
" \"member\": {\n" +
" \"id\": \"memberId\",\n" +
" \"userkey\": \"userKey\"\n" +
" }\n" +
"}"
}
)
.toRespond { request, response ->
Expand All @@ -107,12 +107,12 @@ class MdxRealtimeMembersConnectionTest extends Mockery {
expectConnection(withPath("/clientId/users/userId/members.json")
.withMatcher { request ->
return request.body == "{\n" +
" \"member\": {\n" +
" \"id\": \"memberId\",\n" +
" \"login\": \"login\",\n" +
" \"password\": \"abc\"\n" +
" }\n" +
"}"
" \"member\": {\n" +
" \"id\": \"memberId\",\n" +
" \"login\": \"login\",\n" +
" \"password\": \"abc\"\n" +
" }\n" +
"}"
}
)
.toRespond { request, response ->
Expand Down Expand Up @@ -154,11 +154,11 @@ class MdxRealtimeMembersConnectionTest extends Mockery {
expectConnection(withPath("/clientId/users/userId/members/memberId.json")
.withMatcher { request ->
return request.body == "{\n" +
" \"member\": {\n" +
" \"id\": \"memberId\",\n" +
" \"userkey\": \"newUserKey\"\n" +
" }\n" +
"}"
" \"member\": {\n" +
" \"id\": \"memberId\",\n" +
" \"userkey\": \"newUserKey\"\n" +
" }\n" +
"}"
}
)
.toRespond { request, response ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ class MdxRealtimeUsersConnectionTest extends Mockery {
expectConnection(withPath("/clientId/users.json")
.withMatcher {req ->
return req.body == "{\n" +
" \"user\": {\n" +
" \"id\": \"userId\",\n" +
" \"email\": \"email\",\n" +
" \"first_name\": \"firstName\",\n" +
" \"last_name\": \"lastName\",\n" +
" \"phone\": \"phone\"\n" +
" }\n" +
"}"
" \"user\": {\n" +
" \"id\": \"userId\",\n" +
" \"email\": \"email\",\n" +
" \"first_name\": \"firstName\",\n" +
" \"last_name\": \"lastName\",\n" +
" \"phone\": \"phone\"\n" +
" }\n" +
"}"
})
.toRespond { request, response ->
response.withStatus(HttpStatus.OK)
Expand Down
Loading