Skip to content

Commit 930bc6a

Browse files
committed
fix broken integration test
1 parent 4ad020e commit 930bc6a

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

server/src/main/java/dev/findfirst/core/service/RobotsFetcher.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ public RobotsTxtResponse getRobotsTxt(String url) {
2828
ResponseEntity<String> robots = rest.getForEntity(robotsUri, String.class);
2929
String text = !robots.getBody().isBlank() ? robots.getBody() : "";
3030

31-
return new RobotsTxtResponse(robots.getStatusCode().value(),
32-
text.getBytes(),
31+
return new RobotsTxtResponse(robots.getStatusCode().value(), text.getBytes(),
3332
robots.getHeaders().getContentType() == null ? ""
3433
: robots.getHeaders().getContentType().toString());
3534

server/src/test/java/dev/findfirst/core/controller/BookmarkControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void addBookmark() {
198198
restTemplate.exchange(bookmarkURI, HttpMethod.POST, entFailScrape, BookmarkDTO.class);
199199
assertEquals(HttpStatus.OK, responseFailScrape.getStatusCode());
200200
var bkmkFailScrape = Optional.ofNullable(responseFailScrape.getBody());
201-
assertEquals("facebook.com", bkmkFailScrape.orElseThrow().title());
201+
assertEquals("Facebook", bkmkFailScrape.orElseThrow().title());
202202

203203
// Test without scrapping
204204
var entNoScrape = getHttpEntity(restTemplate,

0 commit comments

Comments
 (0)