File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/test/java/dmu/dasom/api/domain/executive/service Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,30 @@ void createExecutive_success() {
8181 assertThat (responseDto .getId ()).isEqualTo (id );
8282 }
8383
84+ @ Test
85+ @ DisplayName ("임원진 멤버 삭제 - 성공" )
86+ void deleteExecutive_success () {
87+ // given
88+ Long id = 1L ;
89+
90+ ExecutiveEntity entity = ExecutiveEntity .builder ()
91+ .id (1L )
92+ .name ("김다솜" )
93+ .position ("회장" )
94+ .githubUrl ("https://github.com/dasom" )
95+ .build ();
96+
97+ when (executiveRepository .findById (id )).thenReturn (Optional .of (entity ));
98+ doNothing ().when (executiveRepository ).delete (entity );
99+
100+ // when
101+ executiveService .deleteExective (id );
102+
103+ // then
104+ verify (executiveRepository , times (1 )).findById (id );
105+ verify (executiveRepository , times (1 )).delete (entity );
106+ }
107+
84108 @ Test
85109 @ DisplayName ("임원진 멤버 수정 - 성공" )
86110 void updateExecutive_success () {
You can’t perform that action at this time.
0 commit comments