Developer 역할 Spring 골격 smoke (role-developer-live-v2-001)
All checks were successful
ci / test (pull_request) Successful in 1m23s

This commit is contained in:
forge-bot 2026-07-14 08:00:36 +00:00
parent 181ae04109
commit 4329c6109c

View file

@ -0,0 +1,44 @@
package com.example.developer.service;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest
class DeveloperServiceTest {
@Autowired
private DeveloperService developerService;
@Test
void contextLoads() {
assertNotNull(developerService);
}
@Test
void getRole_returnsDeveloper() {
assertEquals("DEVELOPER", developerService.getRole());
}
@Test
void isAuthorized_forCodeAction_returnsTrue() {
assertTrue(developerService.isAuthorized("code"));
}
@Test
void isAuthorized_forReviewAction_returnsTrue() {
assertTrue(developerService.isAuthorized("review"));
}
@Test
void isAuthorized_forDeployAction_returnsTrue() {
assertTrue(developerService.isAuthorized("deploy"));
}
@Test
void isAuthorized_forUnknownAction_returnsFalse() {
assertFalse(developerService.isAuthorized("admin"));
}
}