Skip to content

Commit

Permalink
fix: change server spec and fix test (#82)
Browse files Browse the repository at this point in the history
* hotfix: trigger deploy.yml

* hotfix: fix ddl auto

* hotfix: trigger scheduler

* hotfix: fix ninja api key

* hotfix: trigger scheduler

* hotfix: fix cron of scheduler

* test: fix test
  • Loading branch information
chominho96 authored Mar 4, 2024
1 parent 41645fe commit 24d233f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- develop
- feat/#81

jobs:
build-and-push:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ class StockQueryServiceTest {
@Test
void 종목_상세_정보의_배당날짜를_올해기준으로_반환한다() {
// given
int expectedMonth = 3;
int expectedDayOfMonth = 1;
LocalDate expectedDate = LocalDate.now().minusYears(1).plusDays(1);
int lastYear = LocalDate.now().getYear() - 1;
Instant exDividendDate = LocalDate.of(lastYear, 3, 1).atStartOfDay().toInstant(UTC);
Instant exDividendDate = LocalDate.now().minusYears(1).plusDays(1).atStartOfDay().toInstant(UTC);
Stock appl = StockFixture.createStock(AAPL, Sector.TECHNOLOGY, 2.0);
Dividend dividend = DividendFixture.createDividendWithPaymentDate(appl.getId(), 0.5, exDividendDate);

Expand All @@ -116,7 +115,7 @@ class StockQueryServiceTest {
StockDetailResponse actual = stockQueryService.getStockByTicker(appl.getTicker());

// then
assertThat(actual.earliestPaymentDate()).isEqualTo(LocalDate.of(lastYear + 1, expectedMonth, expectedDayOfMonth));
assertThat(actual.earliestPaymentDate()).isEqualTo(LocalDate.of(lastYear + 1, expectedDate.getMonth(), expectedDate.getDayOfMonth()));
}

@Test
Expand Down

0 comments on commit 24d233f

Please sign in to comment.