Skip to content

Commit b12560a

Browse files
author
alina tarasova
committed
Merge remote-tracking branch 'upstream/main' into transactional
2 parents e836aa9 + 5e0c4eb commit b12560a

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ Demo: https://java-spring-blog.hexlet.app/
2020
## Development
2121

2222
```bash
23-
# https://localhost
23+
make setup
24+
2425
make dev
26+
# https://localhost
27+
# username: [email protected]
28+
# password: qwerty
2529

2630
make test
2731
```

frontend/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Vite + React + TS</title>
6+
<title>Java Spring Blog</title>
77
</head>
88
<body>
99
<div id="root"></div>

src/main/resources/application.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ rsa:
3030

3131
server:
3232
address: 0.0.0.0
33+
port: ${PORT:8080}

src/test/java/io/hexlet/blog/controller/api/PostsControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void testCreate() throws Exception {
124124
mockMvc.perform(request)
125125
.andExpect(status().isCreated());
126126

127-
var post = postRepository.findBySlug(testPost.getSlug()).orElseThrow();
127+
var post = postRepository.findBySlug(testPost.getSlug()).orElse(null);
128128
assertNotNull(post);
129129
assertThat(post.getName()).isEqualTo(testPost.getName());
130130
}

src/test/java/io/hexlet/blog/controller/api/UsersControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void testCreate() throws Exception {
107107
mockMvc.perform(request)
108108
.andExpect(status().isCreated());
109109

110-
var user = userRepository.findByEmail(data.getEmail()).orElseThrow();
110+
var user = userRepository.findByEmail(data.getEmail()).orElse(null);
111111

112112
assertNotNull(user);
113113
assertThat(user.getFirstName()).isEqualTo(data.getFirstName());

0 commit comments

Comments
 (0)