Skip to content

Commit d85fd49

Browse files
committed
Use mock properties when testing
1 parent 1e9ca0f commit d85fd49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/io/spring/githubchangeloggenerator/github/service/GitHubServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
import org.junit.runner.RunWith;
2424

2525
import org.springframework.beans.factory.annotation.Autowired;
26-
import org.springframework.boot.context.properties.EnableConfigurationProperties;
2726
import org.springframework.boot.test.autoconfigure.web.client.RestClientTest;
27+
import org.springframework.boot.test.mock.mockito.MockBean;
2828
import org.springframework.core.io.ClassPathResource;
2929
import org.springframework.http.HttpHeaders;
3030
import org.springframework.http.HttpMethod;
@@ -47,7 +47,7 @@
4747
*/
4848
@RunWith(SpringRunner.class)
4949
@RestClientTest(GitHubService.class)
50-
@EnableConfigurationProperties(GitHubProperties.class)
50+
@MockBean(GitHubProperties.class)
5151
public class GitHubServiceTests {
5252

5353
private static final String MILESTONES_URL = "/repos/org/repo/milestones";

0 commit comments

Comments
 (0)