projects
/
demos
/
spring-boot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
06ad05b
)
Added a test that asserts, that the welcome page can be loaded
author
Kai Moritz
<kai@juplo.de>
Fri, 7 Apr 2023 12:27:23 +0000
(14:27 +0200)
committer
Kai Moritz
<kai@juplo.de>
Fri, 7 Apr 2023 12:27:23 +0000
(14:27 +0200)
src/test/java/de/juplo/demo/DemoApplicationTests.java
patch
|
blob
|
history
diff --git
a/src/test/java/de/juplo/demo/DemoApplicationTests.java
b/src/test/java/de/juplo/demo/DemoApplicationTests.java
index
791a60b
..
e16b8ec
100644
(file)
--- a/
src/test/java/de/juplo/demo/DemoApplicationTests.java
+++ b/
src/test/java/de/juplo/demo/DemoApplicationTests.java
@@
-1,13
+1,26
@@
package de.juplo.demo;
import org.junit.jupiter.api.Test;
package de.juplo.demo;
import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.autoconfigure.web.reactive.AutoConfigureWebTestClient;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.web.reactive.server.WebTestClient;
+
@SpringBootTest
@SpringBootTest
+@AutoConfigureWebTestClient
class DemoApplicationTests {
@Test
void contextLoads() {
}
class DemoApplicationTests {
@Test
void contextLoads() {
}
+
+ @Test
+ void getWelcomeResponseIsOk(@Autowired WebTestClient webClient) {
+ webClient
+ .get().uri("/")
+ .exchange()
+ .expectStatus().isOk();
+ }
}
}