Merge pull request #2505 from gradido/fix_footer_year_test

test(other): fix tests breaking with the new year
This commit is contained in:
Ulf Gebhardt 2023-01-03 13:06:20 +01:00 committed by GitHub
commit 34bf160291
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -183,8 +183,10 @@ describe('util/creation', () => {
})
it('has the clock set correctly', () => {
const targetMonthString =
(targetDate.getMonth() + 1 < 10 ? '0' : '') + String(targetDate.getMonth() + 1)
expect(new Date().toISOString()).toContain(
`${targetDate.getFullYear()}-${targetDate.getMonth() + 1}-${targetDate.getDate()}T23:`,
`${targetDate.getFullYear()}-${targetMonthString}-${targetDate.getDate()}T23:`,
)
})

View File

@ -32,8 +32,8 @@ describe('ContentFooter', () => {
expect(wrapper.find('div.copyright').exists()).toBeTruthy()
})
it('renders the copyright year', () => {
expect(mocks.$t).toBeCalledWith('footer.copyright.year', { year: 2022 })
it('renders the current year as copyright year', () => {
expect(mocks.$t).toBeCalledWith('footer.copyright.year', { year: new Date().getFullYear() })
})
it('renders a link to Gradido-Akademie', () => {