Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
st3iny committed Feb 15, 2023
1 parent 9b58055 commit 2da21de
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const state = {
canSubscribeLink: true,
// user-defined Nextcloud settings
momentLocale: 'en',
attachmentsFolder: '/',
attachmentsFolder: '/Calendar',
}

const mutations = {
Expand Down
5 changes: 5 additions & 0 deletions tests/javascript/unit/store/settings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ describe('store/settings test suite', () => {
momentLocale: 'en',
disableAppointments: false,
canSubscribeLink: true,
attachmentsFolder: '/Calendar',
})
})

Expand Down Expand Up @@ -175,6 +176,7 @@ describe('store/settings test suite', () => {
forceEventAlarmType: false,
disableAppointments: false,
canSubscribeLink: true,
attachmentsFolder: '/Calendar',
}

const settings = {
Expand All @@ -195,6 +197,7 @@ describe('store/settings test suite', () => {
forceEventAlarmType: false,
disableAppointments: false,
canSubscribeLink: true,
attachmentsFolder: '/Attachments',
}

settingsStore.mutations.loadSettingsFromServer(state, settings)
Expand All @@ -218,6 +221,7 @@ Initial settings:
- ForceEventAlarmType: false
- disableAppointments: false
- CanSubscribeLink: true
- attachmentsFolder: /Attachments
`)
expect(state).toEqual({
appVersion: '2.1.0',
Expand All @@ -238,6 +242,7 @@ Initial settings:
forceEventAlarmType: false,
disableAppointments: false,
canSubscribeLink: true,
attachmentsFolder: '/Attachments',
})
})

Expand Down
4 changes: 4 additions & 0 deletions tests/php/unit/Controller/ViewControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public function testIndex(): void {
['user123', 'calendar', 'showWeekNr', 'defaultShowWeekNr', 'yes'],
['user123', 'calendar', 'skipPopover', 'defaultSkipPopover', 'yes'],
['user123', 'calendar', 'timezone', 'defaultTimezone', 'Europe/Berlin'],
['user123', 'dav', 'attachmentsFolder', '/Calendar', '/Calendar'],
['user123', 'calendar', 'slotDuration', 'defaultSlotDuration', '00:15:00'],
['user123', 'calendar', 'defaultReminder', 'defaultDefaultReminder', '00:10:00'],
['user123', 'calendar', 'showTasks', 'defaultShowTasks', '00:15:00'],
Expand Down Expand Up @@ -146,6 +147,7 @@ public function testIndex(): void {
['talk_enabled', true],
['talk_api_version', 'v4'],
['timezone', 'Europe/Berlin'],
['attachments_folder', '/Calendar'],
['slot_duration', '00:15:00'],
['default_reminder', '00:10:00'],
['show_tasks', false],
Expand Down Expand Up @@ -194,6 +196,7 @@ public function testIndexViewFix(string $savedView, string $expectedView): void
['user123', 'calendar', 'showWeekNr', 'defaultShowWeekNr', 'yes'],
['user123', 'calendar', 'skipPopover', 'defaultSkipPopover', 'yes'],
['user123', 'calendar', 'timezone', 'defaultTimezone', 'Europe/Berlin'],
['user123', 'dav', 'attachmentsFolder', '/Calendar', '/Calendar'],
['user123', 'calendar', 'slotDuration', 'defaultSlotDuration', '00:15:00'],
['user123', 'calendar', 'defaultReminder', 'defaultDefaultReminder', '00:10:00'],
['user123', 'calendar', 'showTasks', 'defaultShowTasks', '00:15:00'],
Expand Down Expand Up @@ -223,6 +226,7 @@ public function testIndexViewFix(string $savedView, string $expectedView): void
['talk_enabled', false],
['talk_api_version', 'v1'],
['timezone', 'Europe/Berlin'],
['attachments_folder', '/Calendar'],
['slot_duration', '00:15:00'],
['default_reminder', '00:10:00'],
['show_tasks', false],
Expand Down

0 comments on commit 2da21de

Please sign in to comment.