From f22f7028c4dc4924b577e1d9c2c554a371e8ea46 Mon Sep 17 00:00:00 2001 From: "hehihoho3@gmail.com" Date: Thu, 23 Jul 2026 15:13:46 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=B0=9C=ED=96=89/=EC=9C=A0?= =?UTF-8?q?=ED=86=B5(=EB=B0=9C=ED=96=89=20=ED=81=90)=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=20=EC=A0=9C=EA=B1=B0=20=E2=80=94=20=EC=98=88=EB=8A=A5=20?= =?UTF-8?q?=EC=A0=84=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 유통(내가 올려서 발행)에서 예능 소재 파이프라인으로 방향을 틀면서 발행 큐 기능을 제거한다. domain/publish 전체와 발행 준비 UI(재가공 화면), 사이드바 발행 큐 링크, 대시보드 발행 현황 위젯을 걷어냈다. - domain/publish/* (Controller/Service/Repository/Entity) 삭제 - publish.html · PublishServiceTest 삭제 - rework.html 발행 준비 섹션·JS 제거 - dashboard.html · DashboardService 발행 집계 제거 - WebController /publish 라우트, sidebar 링크 제거 - ChannelVideo.publishedAt(원본 게시일)은 발행 기능과 무관하여 그대로 유지 Co-Authored-By: Claude Opus 4.8 (1M context) --- .../domain/publish/PublishController.java | 53 ------- .../domain/publish/PublishPackage.java | 69 --------- .../publish/PublishPackageRepository.java | 22 --- .../domain/publish/PublishService.java | 84 ----------- .../yanalyst/service/DashboardService.java | 5 +- .../yanalyst/web/DashboardApiController.java | 2 +- .../com/hlab/yanalyst/web/WebController.java | 6 - src/main/resources/templates/dashboard.html | 16 +-- .../resources/templates/layout/sidebar.html | 3 - src/main/resources/templates/publish.html | 136 ------------------ src/main/resources/templates/rework.html | 132 ++--------------- .../domain/publish/PublishServiceTest.java | 67 --------- .../service/DashboardServiceTest.java | 7 +- 13 files changed, 20 insertions(+), 582 deletions(-) delete mode 100644 src/main/java/com/hlab/yanalyst/domain/publish/PublishController.java delete mode 100644 src/main/java/com/hlab/yanalyst/domain/publish/PublishPackage.java delete mode 100644 src/main/java/com/hlab/yanalyst/domain/publish/PublishPackageRepository.java delete mode 100644 src/main/java/com/hlab/yanalyst/domain/publish/PublishService.java delete mode 100644 src/main/resources/templates/publish.html delete mode 100644 src/test/java/com/hlab/yanalyst/domain/publish/PublishServiceTest.java diff --git a/src/main/java/com/hlab/yanalyst/domain/publish/PublishController.java b/src/main/java/com/hlab/yanalyst/domain/publish/PublishController.java deleted file mode 100644 index ae5d2d5..0000000 --- a/src/main/java/com/hlab/yanalyst/domain/publish/PublishController.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.hlab.yanalyst.domain.publish; - -import com.hlab.yanalyst.global.common.ApiResponse; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.*; - -import java.time.LocalDateTime; -import java.util.List; -import java.util.Map; - -@RestController -@RequestMapping("/api/v1/publish") -@RequiredArgsConstructor -@Tag(name = "Publish API", description = "발행(배포) 패키지 준비/추적") -public class PublishController { - - private final PublishService publishService; - - @GetMapping("/by-video/{channelVideoId}") - @Operation(summary = "영상별 발행 패키지 조회", description = "없으면 data=null.") - public ApiResponse getByVideo(@PathVariable Long channelVideoId) { - return ApiResponse.ok(publishService.getByVideo(channelVideoId)); - } - - @PostMapping("/by-video/{channelVideoId}") - @Operation(summary = "발행 패키지 저장(upsert)", - description = "body: {title, description, hashtags, platform, scheduledAt(ISO), status(DRAFT|READY|PUBLISHED)}") - public ApiResponse upsert(@PathVariable Long channelVideoId, @RequestBody Map body) { - LocalDateTime scheduledAt = null; - String s = body.get("scheduledAt"); - if (s != null && !s.isBlank()) { - scheduledAt = LocalDateTime.parse(s.length() == 16 ? s + ":00" : s); - } - PublishPackage p = publishService.upsert(channelVideoId, - body.get("title"), body.get("description"), body.get("hashtags"), - body.get("platform"), scheduledAt, body.get("status")); - return ApiResponse.ok(p); - } - - @PostMapping("/{id}/published") - @Operation(summary = "발행 완료 처리", description = "body: {url} — 상태를 PUBLISHED 로 바꾸고 URL/시각 기록.") - public ApiResponse markPublished(@PathVariable Long id, @RequestBody Map body) { - return ApiResponse.ok(publishService.markPublished(id, body.get("url"))); - } - - @GetMapping - @Operation(summary = "발행 큐 조회", description = "status(DRAFT|READY|PUBLISHED) 필터, 예약일 순.") - public ApiResponse> list(@RequestParam(required = false) String status) { - return ApiResponse.ok(publishService.list(status)); - } -} diff --git a/src/main/java/com/hlab/yanalyst/domain/publish/PublishPackage.java b/src/main/java/com/hlab/yanalyst/domain/publish/PublishPackage.java deleted file mode 100644 index f47c99d..0000000 --- a/src/main/java/com/hlab/yanalyst/domain/publish/PublishPackage.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.hlab.yanalyst.domain.publish; - -import jakarta.persistence.*; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import org.springframework.data.annotation.CreatedDate; -import org.springframework.data.annotation.LastModifiedDate; -import org.springframework.data.jpa.domain.support.AuditingEntityListener; - -import java.time.LocalDateTime; - -/** - * 발행(배포) 패키지 — 재가공한 영상을 어디에/언제/어떤 메타데이터로 올릴지 준비하고, - * 발행 결과(URL)를 기록한다. 실제 업로드는 수동(또는 추후 플랫폼 API 연동) — 여기는 준비·추적 단계. - * ChannelVideo 와 1:1. - */ -@Entity -@Table(name = "publish_packages", - uniqueConstraints = @UniqueConstraint(columnNames = "channel_video_id")) -@Getter -@Setter -@NoArgsConstructor -@EntityListeners(AuditingEntityListener.class) -public class PublishPackage { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - @Column(name = "channel_video_id", nullable = false) - private Long channelVideoId; - - @Column(columnDefinition = "TEXT") - private String title; - - @Column(columnDefinition = "TEXT") - private String description; - - @Column(columnDefinition = "TEXT") - private String hashtags; - - /** 대상 플랫폼: YOUTUBE / TIKTOK / REELS 등. */ - @Column(length = 100) - private String platform = "YOUTUBE"; - - /** 발행 예약 일시(선택). */ - @Column(name = "scheduled_at") - private LocalDateTime scheduledAt; - - /** DRAFT(작성중) / READY(발행대기) / PUBLISHED(발행완료). */ - @Column(length = 20) - private String status = "DRAFT"; - - /** 발행 완료 시 실제 업로드된 URL(수동 기록). */ - @Column(name = "published_url", columnDefinition = "TEXT") - private String publishedUrl; - - @Column(name = "published_at") - private LocalDateTime publishedAt; - - @CreatedDate - @Column(name = "created_at", updatable = false) - private LocalDateTime createdAt; - - @LastModifiedDate - @Column(name = "updated_at") - private LocalDateTime updatedAt; -} diff --git a/src/main/java/com/hlab/yanalyst/domain/publish/PublishPackageRepository.java b/src/main/java/com/hlab/yanalyst/domain/publish/PublishPackageRepository.java deleted file mode 100644 index 82add5d..0000000 --- a/src/main/java/com/hlab/yanalyst/domain/publish/PublishPackageRepository.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.hlab.yanalyst.domain.publish; - -import org.springframework.data.domain.Sort; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; - -import java.util.List; -import java.util.Optional; - -public interface PublishPackageRepository extends JpaRepository { - Optional findByChannelVideoId(Long channelVideoId); - List findByStatus(String status, Sort sort); - long countByStatus(String status); - - /** - * 전체 조회(정렬 포함). {@code findAll(Sort)}는 Criteria 기반이라 nullsLast/First 같은 - * null precedence를 지원하지 않으므로(UnsupportedOperationException), Sort를 HQL ORDER BY로 - * 붙이는 @Query 방식을 사용한다. - */ - @Query("select p from PublishPackage p") - List findAllSorted(Sort sort); -} diff --git a/src/main/java/com/hlab/yanalyst/domain/publish/PublishService.java b/src/main/java/com/hlab/yanalyst/domain/publish/PublishService.java deleted file mode 100644 index ddf935e..0000000 --- a/src/main/java/com/hlab/yanalyst/domain/publish/PublishService.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.hlab.yanalyst.domain.publish; - -import lombok.RequiredArgsConstructor; -import org.springframework.data.domain.Sort; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.StringUtils; - -import java.time.LocalDateTime; -import java.util.List; -import java.util.Set; - -@Service -@RequiredArgsConstructor -@Transactional(readOnly = true) -public class PublishService { - - private final PublishPackageRepository repository; - - private static final Set ALLOWED_STATUS = Set.of("DRAFT", "READY", "PUBLISHED"); - /** 대시보드 표시 순서가 고정되도록 명시적 순서 보장(Set.of 는 반복 순서 미정의). */ - private static final List STATUS_ORDER = List.of("DRAFT", "READY", "PUBLISHED"); - - public PublishPackage getByVideo(Long channelVideoId) { - return repository.findByChannelVideoId(channelVideoId).orElse(null); - } - - /** 영상별 발행 패키지 upsert. */ - @Transactional - public PublishPackage upsert(Long channelVideoId, String title, String description, String hashtags, - String platform, LocalDateTime scheduledAt, String status) { - if (status != null && !ALLOWED_STATUS.contains(status)) { - throw new IllegalArgumentException("허용되지 않은 상태값: " + status + " (가능: " + ALLOWED_STATUS + ")"); - } - PublishPackage p = repository.findByChannelVideoId(channelVideoId).orElseGet(() -> { - PublishPackage np = new PublishPackage(); - np.setChannelVideoId(channelVideoId); - return np; - }); - p.setTitle(title); - p.setDescription(description); - p.setHashtags(hashtags); - if (StringUtils.hasText(platform)) p.setPlatform(platform); - p.setScheduledAt(scheduledAt); - if (StringUtils.hasText(status)) p.setStatus(status); - return repository.save(p); - } - - /** 발행 완료 처리(실제 업로드 URL 기록). */ - @Transactional - public PublishPackage markPublished(Long id, String url) { - PublishPackage p = repository.findById(id) - .orElseThrow(() -> new IllegalArgumentException("Publish package not found: " + id)); - p.setStatus("PUBLISHED"); - p.setPublishedUrl(url); - p.setPublishedAt(LocalDateTime.now()); - return repository.save(p); - } - - /** 대시보드용 발행 요약: 상태별 카운트 + 최근 수정 5건. */ - public java.util.Map dashboardSummary() { - java.util.Map byStatus = new java.util.LinkedHashMap<>(); - for (String s : STATUS_ORDER) { - byStatus.put(s, repository.countByStatus(s)); - } - // 최근 수정순으로 정렬해 상위 5건을 "최근" 으로 노출 (예약일 오름차순인 큐 정렬과 구분). - List all = repository.findAllSorted(Sort.by(Sort.Order.desc("updatedAt"))); - List recent = all.size() > 5 ? List.copyOf(all.subList(0, 5)) : all; - java.util.Map result = new java.util.LinkedHashMap<>(); - result.put("byStatus", byStatus); - result.put("total", (long) all.size()); - result.put("recent", recent); - return result; - } - - /** 발행 큐: 상태(null이면 전체)로 필터, 예약일 → 수정일 순. */ - public List list(String status) { - Sort sort = Sort.by(Sort.Order.asc("scheduledAt").nullsLast(), Sort.Order.desc("updatedAt")); - if (StringUtils.hasText(status)) { - return repository.findByStatus(status, sort); - } - return repository.findAllSorted(sort); - } -} diff --git a/src/main/java/com/hlab/yanalyst/service/DashboardService.java b/src/main/java/com/hlab/yanalyst/service/DashboardService.java index 5744259..f8f9582 100644 --- a/src/main/java/com/hlab/yanalyst/service/DashboardService.java +++ b/src/main/java/com/hlab/yanalyst/service/DashboardService.java @@ -3,7 +3,6 @@ package com.hlab.yanalyst.service; import com.hlab.yanalyst.domain.category.CategoryService; import com.hlab.yanalyst.domain.channel.ChannelVideo; import com.hlab.yanalyst.domain.channel.ChannelVideoCurationService; -import com.hlab.yanalyst.domain.publish.PublishService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -14,7 +13,7 @@ import java.util.List; import java.util.Map; /** - * 홈 대시보드용 단일 집계 — 파이프라인(수집→큐레이션→발행) 현황을 한 번에 묶어 반환한다. + * 홈 대시보드용 단일 집계 — 파이프라인(수집→큐레이션→재가공) 현황을 한 번에 묶어 반환한다. * 각 도메인 서비스의 집계를 조합만 한다(리포지토리 직접 접근 없음). */ @Service @@ -24,13 +23,11 @@ public class DashboardService { private final ChannelVideoCurationService curationService; private final CategoryService categoryService; - private final PublishService publishService; public Map summary() { Map result = new LinkedHashMap<>(); result.put("pipeline", curationService.pipelineStats()); // total, byStatus, bySource, shorts, longForm result.put("categories", categoryService.distribution()); // categories[], uncategorized - result.put("publish", publishService.dashboardSummary()); // byStatus, total, recent List outperformers = curationService.findOutperformers(5, BigDecimal.ONE); result.put("outperformers", outperformers); return result; diff --git a/src/main/java/com/hlab/yanalyst/web/DashboardApiController.java b/src/main/java/com/hlab/yanalyst/web/DashboardApiController.java index f2ca583..f10d7b0 100644 --- a/src/main/java/com/hlab/yanalyst/web/DashboardApiController.java +++ b/src/main/java/com/hlab/yanalyst/web/DashboardApiController.java @@ -21,7 +21,7 @@ public class DashboardApiController { @GetMapping("/summary") @Operation(summary = "대시보드 요약", - description = "파이프라인(수집/상태/출처/포맷) + 카테고리 분포 + 발행 현황 + 떡상 후보 TOP5 를 한 번에 반환.") + description = "파이프라인(수집/상태/출처/포맷) + 카테고리 분포 + 떡상 후보 TOP5 를 한 번에 반환.") public ApiResponse> summary() { return ApiResponse.ok(dashboardService.summary()); } diff --git a/src/main/java/com/hlab/yanalyst/web/WebController.java b/src/main/java/com/hlab/yanalyst/web/WebController.java index 9e505ce..b122385 100644 --- a/src/main/java/com/hlab/yanalyst/web/WebController.java +++ b/src/main/java/com/hlab/yanalyst/web/WebController.java @@ -58,12 +58,6 @@ public class WebController { return "recommend"; } - @GetMapping("/publish") - public String publish(Model model) { - model.addAttribute("currentPage", "publish"); - return "publish"; - } - @GetMapping("/rework/{id}") public String rework(@org.springframework.web.bind.annotation.PathVariable Long id, Model model) { model.addAttribute("currentPage", "collection"); diff --git a/src/main/resources/templates/dashboard.html b/src/main/resources/templates/dashboard.html index 4c38675..b450992 100644 --- a/src/main/resources/templates/dashboard.html +++ b/src/main/resources/templates/dashboard.html @@ -12,7 +12,7 @@
-
지금 할 일 중심 · 수집 → 큐레이션 → 재가공 → 발행
+
지금 할 일 중심 · 수집 → 큐레이션 → 재가공

대시보드

@@ -63,8 +63,6 @@
불러오는 중…

출처 · 포맷

수집함 →
-

발행 현황

발행 큐 →
-
@@ -223,7 +221,6 @@ const pipe = d.pipeline||{}, bs = pipe.byStatus||{}, src = pipe.bySource||{}; const total = Number(pipe.total||0); - const pub = d.publish||{}, pbs = pub.byStatus||{}; const op = d.outperformers||[]; // ----- 액션 바 ----- @@ -261,7 +258,7 @@ document.getElementById('pipeTotal').textContent = '총 ' + fmt(total); const stages = [ ['미검토', bs.NEW], ['검토중', bs.REVIEWING], ['작업대상', bs.TARGET], - ['완료', bs.DONE], ['발행완료', pbs.PUBLISHED] + ['완료', bs.DONE] ]; let bottleneck = stages[0]; for(const s of stages){ if(Number(s[1]||0) > Number(bottleneck[1]||0)) bottleneck = s; } @@ -270,7 +267,6 @@ fbar('검토중', bs.REVIEWING, total) + fbar('작업대상', bs.TARGET, total) + fbar('완료', bs.DONE, total) + - fbar('발행완료', pbs.PUBLISHED, total) + `
병목: ${esc(bottleneck[0])} ${fmt(bottleneck[1])} — 다음 단계로 옮겨보세요
칸반 보드
`; // ----- 출처/포맷 ----- @@ -279,14 +275,6 @@ `
검색 수집${fmt(src.SEARCH)} · ${pct(src.SEARCH,total)}%
` + `
Shorts${fmt(pipe.shorts)} · ${pct(pipe.shorts,total)}%
`; - // ----- 발행 ----- - const ptotal = Number(pub.total||0); - document.getElementById('pubBox').innerHTML = ptotal===0 - ? '
발행 패키지 없음 — 재가공 화면에서 발행안을 저장하세요.
' - : `
작성중${fmt(pbs.DRAFT)}
`+ - `
발행대기${fmt(pbs.READY)}
`+ - `
발행완료${fmt(pbs.PUBLISHED)}
`; - if(window.lucide) lucide.createIcons(); } diff --git a/src/main/resources/templates/layout/sidebar.html b/src/main/resources/templates/layout/sidebar.html index 9909dbb..6f8470d 100644 --- a/src/main/resources/templates/layout/sidebar.html +++ b/src/main/resources/templates/layout/sidebar.html @@ -41,9 +41,6 @@ 칸반 보드 - - 발행 큐 - diff --git a/src/main/resources/templates/publish.html b/src/main/resources/templates/publish.html deleted file mode 100644 index 6c7f56b..0000000 --- a/src/main/resources/templates/publish.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - h-lab - 발행 - - - -
- - - - - -
- - - - - -
- -
- - - - - - - - - - - - - - -
상태플랫폼제목예약발행 URL관리
로딩 중...
-
- - - - -
- - - diff --git a/src/main/resources/templates/rework.html b/src/main/resources/templates/rework.html index 1f0880d..f6948db 100644 --- a/src/main/resources/templates/rework.html +++ b/src/main/resources/templates/rework.html @@ -85,7 +85,7 @@
-
재작성 · 발행
‘재작성(내 버전)’에 각색해 저장하면 상태가 TARGET으로 바뀝니다. 하단 발행 준비에서 제목·해시태그를 저장하면 발행 큐로 들어갑니다.
+
재작성
‘재작성(내 버전)’에 각색해 저장하면 상태가 TARGET으로 바뀝니다.
@@ -121,7 +121,10 @@
-
YouTube에서 열기 → +
+ YouTube에서 열기 → + +
@@ -265,66 +268,10 @@ style="width:100%; min-height:280px; resize:vertical; padding:12px; background:var(--surface-2); border:1px solid var(--glass-border); border-radius:var(--radius-md); color:var(--text); outline:none; font-size:0.95rem; line-height:1.7;">
- - -
-
-

📤 발행 준비

- -
-
-
- - -
-
- - -
-
- - -
-
-
- - -
-
- - -
-
- - -
-
-
- - - 발행 큐 → -
-
-
-
diff --git a/src/test/java/com/hlab/yanalyst/domain/publish/PublishServiceTest.java b/src/test/java/com/hlab/yanalyst/domain/publish/PublishServiceTest.java deleted file mode 100644 index 2691b13..0000000 --- a/src/test/java/com/hlab/yanalyst/domain/publish/PublishServiceTest.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.hlab.yanalyst.domain.publish; - -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; -import org.springframework.data.domain.Sort; - -import java.util.Collections; -import java.util.List; -import java.util.Map; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -/** - * 발행 대시보드 요약: 상태별 카운트 + 최근 5건(전체는 더 많아도 5개로 잘림). - */ -@ExtendWith(MockitoExtension.class) -class PublishServiceTest { - - @Mock PublishPackageRepository repository; - - @InjectMocks PublishService publishService; - - @Test - void dashboardSummary_countsByStatusAndTakesFirstFiveAsRecent() { - when(repository.countByStatus("DRAFT")).thenReturn(2L); - when(repository.countByStatus("READY")).thenReturn(3L); - when(repository.countByStatus("PUBLISHED")).thenReturn(4L); - // list(null) -> repository.findAllSorted(sort); return 7 so recent should cap at 5 - List seven = Collections.nCopies(7, mock(PublishPackage.class)); - when(repository.findAllSorted(any(Sort.class))).thenReturn(seven); - - Map summary = publishService.dashboardSummary(); - - @SuppressWarnings("unchecked") - Map byStatus = (Map) summary.get("byStatus"); - assertThat(byStatus) - .containsEntry("DRAFT", 2L) - .containsEntry("READY", 3L) - .containsEntry("PUBLISHED", 4L); - - assertThat(summary.get("total")).isEqualTo(7L); - - @SuppressWarnings("unchecked") - List recent = (List) summary.get("recent"); - assertThat(recent).hasSize(5); - } - - @Test - void dashboardSummary_recentKeepsAllWhenFiveOrFewer() { - when(repository.countByStatus(any())).thenReturn(0L); - when(repository.findAllSorted(any(Sort.class))) - .thenReturn(Collections.nCopies(3, mock(PublishPackage.class))); - - Map summary = publishService.dashboardSummary(); - - assertThat(summary.get("total")).isEqualTo(3L); - @SuppressWarnings("unchecked") - List recent = (List) summary.get("recent"); - assertThat(recent).hasSize(3); - } -} diff --git a/src/test/java/com/hlab/yanalyst/service/DashboardServiceTest.java b/src/test/java/com/hlab/yanalyst/service/DashboardServiceTest.java index 24024c7..fc7cf75 100644 --- a/src/test/java/com/hlab/yanalyst/service/DashboardServiceTest.java +++ b/src/test/java/com/hlab/yanalyst/service/DashboardServiceTest.java @@ -3,7 +3,6 @@ package com.hlab.yanalyst.service; import com.hlab.yanalyst.domain.category.CategoryService; import com.hlab.yanalyst.domain.channel.ChannelVideo; import com.hlab.yanalyst.domain.channel.ChannelVideoCurationService; -import com.hlab.yanalyst.domain.publish.PublishService; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; @@ -26,7 +25,6 @@ class DashboardServiceTest { @Mock ChannelVideoCurationService curationService; @Mock CategoryService categoryService; - @Mock PublishService publishService; @InjectMocks DashboardService dashboardService; @@ -34,20 +32,17 @@ class DashboardServiceTest { void summary_composesEachServiceUnderItsKey() { Map pipeline = Map.of("total", 200L); Map categories = Map.of("uncategorized", 200L); - Map publish = Map.of("total", 0L); List outperformers = List.of(mock(ChannelVideo.class), mock(ChannelVideo.class)); when(curationService.pipelineStats()).thenReturn(pipeline); when(categoryService.distribution()).thenReturn(categories); - when(publishService.dashboardSummary()).thenReturn(publish); when(curationService.findOutperformers(5, BigDecimal.ONE)).thenReturn(outperformers); Map result = dashboardService.summary(); - assertThat(result).containsOnlyKeys("pipeline", "categories", "publish", "outperformers"); + assertThat(result).containsOnlyKeys("pipeline", "categories", "outperformers"); assertThat(result.get("pipeline")).isSameAs(pipeline); assertThat(result.get("categories")).isSameAs(categories); - assertThat(result.get("publish")).isSameAs(publish); assertThat(result.get("outperformers")).isSameAs(outperformers); } }