Skip to content

Commit e90a394

Browse files
author
Ayzat Murtazin
committed
refactor: fix tests
1 parent a06bd92 commit e90a394

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/java/ru/yandex/practicum/filmorate/storage/FilmDbStorageTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ void testDeleteFilm() {
303303
void testDeleteNotExistingUser() {
304304
int filmId = 999;
305305
String formattedResponse = String.format("Фильм с id '%s' не найден.", filmId);
306-
NotFoundException e = assertThrows(NotFoundException.class, () -> filmDbStorage.findById(filmId));
306+
NotFoundException e = assertThrows(NotFoundException.class, () -> filmDbStorage.remove(filmId));
307307
assertEquals(formattedResponse, e.getMessage());
308308
}
309309

src/test/java/ru/yandex/practicum/filmorate/storage/UserDbStorageTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ void testDeleteUser() {
331331
void testDeleteNotExistingUser() {
332332
int userId = 999;
333333
String formattedResponse = String.format("Пользователь с id '%s' не найден.", userId);
334-
NotFoundException e = assertThrows(NotFoundException.class, () -> userStorage.findById(userId));
334+
NotFoundException e = assertThrows(NotFoundException.class, () -> userStorage.remove(userId));
335335
assertEquals(formattedResponse, e.getMessage());
336336
}
337337
}

0 commit comments

Comments
 (0)