Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- @Transactional
- void getExistingUserPosts() {
- this.user = userRepository.findByUsername("James").get();
- posts = user.getPosts();
- ResponseEntity response = postService.findAllByUser(this.user.getUsername());
- Assertions.assertEquals(posts.toString(), Objects.requireNonNull(response.getBody()).toString());
- }
Advertisement
Add Comment
Please, Sign In to add comment