From 4e7c452c0194978d665150a57c82cd46e0d480dc Mon Sep 17 00:00:00 2001 From: hong seokho Date: Fri, 10 May 2024 07:36:15 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix=20:=20=EC=BF=BC=EB=A6=AC=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../generic_capsule/repository/CapsuleQueryRepository.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java index a77cc11b3..505e9371e 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepository.java @@ -56,8 +56,7 @@ public List findARCapsuleSummaryDtosByCurrentLocation .join(capsule.capsuleSkin, capsuleSkin) .join(capsule.member, member) .where(ST_Contains(mbr, capsule.point).and(capsule.member.id.eq(memberId) - .and(eqCapsuleType(capsuleType))) - .and(capsule.type.eq(CapsuleType.PUBLIC))) + .and(eqCapsuleType(capsuleType)))) .fetch(); } From ccc7b86d75e76ff374d990127d1d3a8bc05a3840 Mon Sep 17 00:00:00 2001 From: hong seokho Date: Fri, 10 May 2024 07:36:25 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix=20:=20test=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/CapsuleQueryRepositoryTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backend/core/src/test/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepositoryTest.java b/backend/core/src/test/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepositoryTest.java index d4ee5bd00..f3d6a84fd 100644 --- a/backend/core/src/test/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepositoryTest.java +++ b/backend/core/src/test/java/site/timecapsulearchive/core/domain/capsule/generic_capsule/repository/CapsuleQueryRepositoryTest.java @@ -134,6 +134,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> c.capsuleType().equals(capsuleType)); assertThat(capsules).allMatch(c -> myCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -153,6 +154,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> c.capsuleType().equals(capsuleType)); assertThat(capsules).allMatch(c -> myCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -172,6 +174,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> c.capsuleType().equals(capsuleType)); assertThat(capsules).allMatch(c -> myCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -191,6 +194,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> c.capsuleType().equals(capsuleType)); assertThat(capsules).allMatch(c -> myCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -210,6 +214,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch( c -> c.capsuleType().equals(CapsuleType.PUBLIC) || c.capsuleType().equals(CapsuleType.SECRET) || @@ -233,6 +238,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch( c -> c.capsuleType().equals(CapsuleType.PUBLIC) || c.capsuleType().equals(CapsuleType.SECRET) || @@ -255,6 +261,7 @@ void setup(@Autowired EntityManager entityManager) { //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> friendCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> c.capsuleType().equals(CapsuleType.PUBLIC)); assertThat(capsules).allMatch(c -> mbr.contains(c.point())); @@ -268,11 +275,12 @@ void setup(@Autowired EntityManager entityManager) { //when List capsules = capsuleQueryRepository.findFriendsARCapsulesByCurrentLocation( - friendCapsuleIds, mbr + friendIds, mbr ); //then SoftAssertions.assertSoftly(softly -> { + assertThat(capsules).isNotEmpty(); assertThat(capsules).allMatch(c -> friendCapsuleIds.contains(c.id())); assertThat(capsules).allMatch(c -> c.capsuleType().equals(CapsuleType.PUBLIC)); assertThat(capsules).allMatch(c -> mbr.contains(c.point()));