package com.cloudhandson.vpdbackoffice.domain.permission;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;

class PermissionViewTest {

  @Test
  void translatesHmmLeaveScopeRulesForBackofficeUsers() {
    PermissionView view = new PermissionView(
        1L,
        2L,
        "HMM_HR_MANAGER",
        10L,
        "HMM_LEAVE_REQUESTS",
        "SELECT",
        "ALLOW",
        "EMPLOYEE_ID MANAGED_TEAM,EMPLOYEE_ID SELF",
        null,
        null,
        null
    );

    assertThat(view.businessRuleSummary())
        .contains("본인 및 직접 보고 팀원 행")
        .contains("본인 직원 행");
  }
}
