Skip to content

Commit

Permalink
fix: ManagerCouponCommandServiceTest 깨지는거 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yenawee committed Nov 14, 2023
1 parent 5efce07 commit eea2bcd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static void setUp() {
.willReturn(Optional.of(cafe));
given(cafePolicyRepository.findByCafeAndIsActivateTrue(any()))
.willReturn(Optional.of(new CafePolicy(10, "reward", 6, cafe)));
given(cafeCouponDesignRepository.findByCafe(any()))
given(cafeCouponDesignRepository.findByCafeAndIsActivateTrue(any()))
.willReturn(Optional.of(new CafeCouponDesign("front", "back", "stamp", null)));
given(couponRepository.findByCafeAndCustomerAndStatus(any(), any(), any()))
.willReturn(List.of(currentCoupon));
Expand All @@ -138,7 +138,7 @@ static void setUp() {
.willReturn(Optional.of(cafe));
given(cafePolicyRepository.findByCafeAndIsActivateTrue(any()))
.willReturn(Optional.of(new CafePolicy(10, "reward", 6, cafe)));
given(cafeCouponDesignRepository.findByCafe(any()))
given(cafeCouponDesignRepository.findByCafeAndIsActivateTrue(any()))
.willReturn(Optional.of(new CafeCouponDesign("front", "back", "stamp", null)));
given(couponRepository.findByCafeAndCustomerAndStatus(any(), any(), any()))
.willReturn(Collections.emptyList());
Expand Down Expand Up @@ -206,7 +206,7 @@ static void setUp() {
.willReturn(Optional.of(cafe));
given(cafePolicyRepository.findByCafeAndIsActivateTrue(any()))
.willReturn(Optional.of(new CafePolicy(10, "reward", 6, cafe)));
given(cafeCouponDesignRepository.findByCafe(any()))
given(cafeCouponDesignRepository.findByCafeAndIsActivateTrue(any()))
.willReturn(Optional.empty());

// then
Expand Down Expand Up @@ -383,7 +383,7 @@ static void setUp() {
.willReturn(List.of(cafe));
given(cafePolicyRepository.findByCafeAndIsActivateTrue(any()))
.willReturn(Optional.of(new CafePolicy(maxStampCount, "reward", 6, cafe)));
given(cafeCouponDesignRepository.findByCafe(any()))
given(cafeCouponDesignRepository.findByCafeAndIsActivateTrue(any()))
.willReturn(Optional.of(new CafeCouponDesign("front", "back", "stamp", null)));
given(couponRepository.findById(any()))
.willReturn(Optional.of(coupon));
Expand Down

0 comments on commit eea2bcd

Please sign in to comment.