Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit 2ffae1b

Browse files
committed
Latest fixes :corssed_fingers:
1 parent 776bfaf commit 2ffae1b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dependencies {
4545
testImplementation(group: 'junit', name:'junit', version:'4.13.2')
4646
testImplementation(group:'org.springframework.boot', name:'spring-boot-starter-test', version:"${springBootVer}")
4747
// Groovy
48-
testImplementation (group: 'org.apache.groovy', name: 'groovy-all', version: '4.0.15', ext: 'pom')
48+
testImplementation (group: 'org.apache.groovy', name: 'groovy-all', version: '4.0.26', ext: 'pom')
4949

5050
// Constraints
5151
constraints {
@@ -55,9 +55,10 @@ dependencies {
5555
}
5656

5757
// Spock
58-
testImplementation(group:'org.spockframework', name:'spock-core', version:'2.0-M4-groovy-3.0')
59-
testImplementation(group:'org.spockframework', name:'spock-spring', version:'2.0-M4-groovy-3.0')
58+
testImplementation(group:'org.spockframework', name:'spock-core', version:'2.4-M6-groovy-4.0')
59+
testImplementation(group:'org.spockframework', name:'spock-spring', version:'2.4-M6-groovy-4.0')
6060
testRuntimeOnly(group:'cglib', name:'cglib-nodep', version:'3.3.0')
61+
testRuntimeOnly('org.junit.platform:junit-platform-launcher')
6162
}
6263

6364
test {

src/main/java/com/twilio/accountsecurity/controllers/PhoneVerificationController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public PhoneVerificationController(PhoneVerificationService phoneVerificationSer
2626
}
2727

2828
@RequestMapping(path = "start", method = RequestMethod.POST,
29-
consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
29+
consumes = MediaType.APPLICATION_JSON_VALUE)
3030
public ResponseEntity<?> start(@Valid @RequestBody PhoneVerificationStartRequest requestBody) {
3131
return runWithCatch(() -> {
3232
phoneVerificationService.start(

src/test/groovy/com/twilio/accountsecurity/controllers/PhoneVerificationControllerSpec.groovy

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.twilio.accountsecurity.controllers
22

3-
import com.fasterxml.jackson.core.JsonFactoryBuilder
43
import com.twilio.accountsecurity.controllers.requests.PhoneVerificationStartRequest
54
import com.twilio.accountsecurity.controllers.requests.PhoneVerificationVerifyRequest
65
import com.twilio.accountsecurity.exceptions.PhoneVerificationException
@@ -37,7 +36,7 @@ class PhoneVerificationControllerSpec extends Specification {
3736
when:
3837
def response = mockMvc.perform(post('/api/phone-verification/start')
3938
.content(requestBody)
40-
.contentType(MediaType.APPLICATION_JSON_UTF8))
39+
.contentType(MediaType.APPLICATION_JSON))
4140
.andReturn().response
4241

4342
then:
@@ -55,7 +54,7 @@ class PhoneVerificationControllerSpec extends Specification {
5554
when:
5655
def response = mockMvc.perform(post('/api/phone-verification/start')
5756
.content(requestBody)
58-
.contentType(MediaType.APPLICATION_JSON_UTF8))
57+
.contentType(MediaType.APPLICATION_JSON))
5958
.andReturn().response
6059

6160
then:
@@ -73,7 +72,7 @@ class PhoneVerificationControllerSpec extends Specification {
7372
mockMvc
7473
.perform(post('/api/phone-verification/verify')
7574
.content(requestBody)
76-
.contentType(MediaType.APPLICATION_JSON_UTF8))
75+
.contentType(MediaType.APPLICATION_JSON))
7776
.andExpect(status().isOk())
7877
.andExpect(request().sessionAttribute("ph_verified", true))
7978
}
@@ -89,7 +88,7 @@ class PhoneVerificationControllerSpec extends Specification {
8988
when:
9089
def response = mockMvc.perform(post('/api/phone-verification/verify')
9190
.content(requestBody)
92-
.contentType(MediaType.APPLICATION_JSON_UTF8))
91+
.contentType(MediaType.APPLICATION_JSON))
9392
.andReturn().response
9493

9594
then:

0 commit comments

Comments
 (0)