Skip to content

Commit

Permalink
omg i almost died
Browse files Browse the repository at this point in the history
  • Loading branch information
don-bigdad committed Jan 26, 2024
1 parent a7a8a79 commit 8364d1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.example.springbootbookshop.repository;

import com.example.springbootbookshop.entity.Order;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
Expand All @@ -14,5 +14,5 @@ public interface OrderRepository extends JpaRepository<Order, Long> {
Optional<Order> findOrderByIdAndUserId(Long orderId, Long userId);

@EntityGraph(attributePaths = {"user", "orderItems"})
Set<Order> findAllByUserId(Long userId, Pageable pageable);
List<Order> findAllByUserId(Long userId, Pageable pageable);
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void getBookById_ValidId_Ok() throws Exception {
void deleteBookByIdAssertSuccess() throws Exception {
mockMvc.perform(delete("/books/2")
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isNotFound());
.andExpect(status().isNoContent());
}

@Test
Expand Down

0 comments on commit 8364d1d

Please sign in to comment.