Skip to content

Commit

Permalink
Merge pull request #194 from Kernel360/lee
Browse files Browse the repository at this point in the history
[#54] env 관련 테스트 수정
  • Loading branch information
km2535 authored Aug 29, 2024
2 parents 06444a0 + 6dba7f1 commit fd6c217
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.env
/build/
/src/main/resources/.env
/src/main/resources/logback-spring.xml
5 changes: 2 additions & 3 deletions src/test/java/com/speech/up/UpApplicationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,13 @@ void setUp() {
@DisplayName("환경 변수가 로드되었는지 테스트")
void testEnvironmentVariablesLoaded() {
// given
when(dotenvMock.get("JWT_SECRET_KEY")).thenReturn("secret");
when( dotenvMock.get("is_not_exist")).thenReturn("secret");

// when
UpApplication.main(new String[] {});

// then
assertEquals("secret", dotenvMock.get("JWT_SECRET_KEY"));
assertNotNull(upApplication,System.getenv("JWT_SECRET_KEY"));
assertEquals(dotenvMock.get("is_not_exist"), "secret");
}

@Test
Expand Down

0 comments on commit fd6c217

Please sign in to comment.