Commit faaf9a7e authored by Stephane Nicoll's avatar Stephane Nicoll

Upgrade to SendGrid 4.4.4

Closes gh-20092
parent b8ccfbaf
/* /*
* Copyright 2012-2019 the original author or authors. * Copyright 2012-2020 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -52,7 +52,7 @@ class SendGridAutoConfigurationTests { ...@@ -52,7 +52,7 @@ class SendGridAutoConfigurationTests {
void expectedSendGridBeanCreatedApiKey() { void expectedSendGridBeanCreatedApiKey() {
loadContext("spring.sendgrid.api-key:SG.SECRET-API-KEY"); loadContext("spring.sendgrid.api-key:SG.SECRET-API-KEY");
SendGrid sendGrid = this.context.getBean(SendGrid.class); SendGrid sendGrid = this.context.getBean(SendGrid.class);
assertThat(sendGrid).extracting("apiKey").isEqualTo("SG.SECRET-API-KEY"); assertThat(sendGrid.getRequestHeaders().get("Authorization")).isEqualTo("Bearer SG.SECRET-API-KEY");
} }
@Test @Test
...@@ -66,7 +66,7 @@ class SendGridAutoConfigurationTests { ...@@ -66,7 +66,7 @@ class SendGridAutoConfigurationTests {
void autoConfigurationNotFiredWhenBeanAlreadyCreated() { void autoConfigurationNotFiredWhenBeanAlreadyCreated() {
loadContext(ManualSendGridConfiguration.class, "spring.sendgrid.api-key:SG.SECRET-API-KEY"); loadContext(ManualSendGridConfiguration.class, "spring.sendgrid.api-key:SG.SECRET-API-KEY");
SendGrid sendGrid = this.context.getBean(SendGrid.class); SendGrid sendGrid = this.context.getBean(SendGrid.class);
assertThat(sendGrid).extracting("apiKey").isEqualTo("SG.CUSTOM_API_KEY"); assertThat(sendGrid.getRequestHeaders().get("Authorization")).isEqualTo("Bearer SG.CUSTOM_API_KEY");
} }
@Test @Test
......
...@@ -1533,7 +1533,7 @@ bom { ...@@ -1533,7 +1533,7 @@ bom {
] ]
} }
} }
library("SendGrid", "4.4.1") { library("SendGrid", "4.4.4") {
group("com.sendgrid") { group("com.sendgrid") {
modules = [ modules = [
"sendgrid-java" "sendgrid-java"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment