Skip to content

Commit

Permalink
Merge branch 'staging' into async
Browse files Browse the repository at this point in the history
  • Loading branch information
asteriskzie committed May 26, 2024
2 parents 695574d + 03cfd96 commit 444f52d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ dependencies {
compileOnly("org.projectlombok:lombok")
developmentOnly("org.springframework.boot:spring-boot-devtools")
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
Expand Down Expand Up @@ -59,7 +60,7 @@ public void setUp() {


@Test
public void testGetSubsboxReview() throws Exception {
public void testGetSubsboxReview() throws Exception {
String subscriptionBoxId = this.reviews.getFirst().getSubsbox();
List<Review> curReviews = new ArrayList<>();
for (Review review : this.reviews) {
Expand All @@ -68,7 +69,6 @@ public void testGetSubsboxReview() throws Exception {
}
}

when(reviewRepo.findByIdSubsbox(subscriptionBoxId)).thenReturn(curReviews);
when(reviewRepo.findByIdSubsbox(subscriptionBoxId)).thenReturn(curReviews);

List<Review> foundReviews = reviewService.getSubsboxReview(subscriptionBoxId, null);
Expand All @@ -78,7 +78,7 @@ public void testGetSubsboxReview() throws Exception {
verify(reviewRepo).findByIdSubsbox(subscriptionBoxId);
}

@Test
@Test
public void testGetSubsboxReviewNotFound() throws Exception {
String subscriptionBoxId = "nonexistent_subsbox_id";

Expand All @@ -87,13 +87,13 @@ public void testGetSubsboxReviewNotFound() throws Exception {
List<Review> foundReviews = reviewService.getSubsboxReview(subscriptionBoxId, null);

assertNotNull(foundReviews);
assertEquals(0, foundReviews.size());
assertEquals(0, foundReviews.size());

verify(reviewRepo).findByIdSubsbox(subscriptionBoxId);
}

@Test
public void testGetSubsboxReviewApproved() throws Exception {
public void testGetSubsboxReviewApproved() throws Exception {
String subscriptionBoxId = this.reviews.getFirst().getSubsbox();

List <Review> cuReviews = new ArrayList<>();
Expand Down

0 comments on commit 444f52d

Please sign in to comment.