Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2022-01-18 19:45:43 +0300
committerRichard Steinmetz <richard@steinmetz.cloud>2022-01-18 19:45:43 +0300
commitb4cb3d085bd6739b0ff345fb8b2f1a3f8e98f7ef (patch)
tree80e3347368556a9ea29c49abfd5b56895556d4b9 /src/tests
parentdb5fb32ee2e5db815d1446aaf0d814a2e08c5521 (diff)
Fix syncing priority inbox
Fix #4925 New and changed envelopes will now show up properly after syncing the priority inbox. Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/unit/util/priorityInbox.spec.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/tests/unit/util/priorityInbox.spec.js b/src/tests/unit/util/priorityInbox.spec.js
new file mode 100644
index 000000000..35680fa97
--- /dev/null
+++ b/src/tests/unit/util/priorityInbox.spec.js
@@ -0,0 +1,44 @@
+/**
+ * @copyright Copyright (c) 2022 Richard Steinmetz <richard@steinmetz.cloud>
+ *
+ * @author Richard Steinmetz <richard@steinmetz.cloud>
+ *
+ * @license AGPL-3.0-or-later
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+import {
+ getPrioritySearchQueries,
+ priorityImportantQuery,
+ priorityOtherQuery,
+ priorityStarredQuery,
+} from '../../../util/priorityInbox'
+
+describe('priorityInbox', () => {
+ it('has correct query constants', () => {
+ expect(priorityImportantQuery).to.equal('is:pi-important')
+ expect(priorityStarredQuery).to.equal('is:pi-starred')
+ expect(priorityOtherQuery).to.equal('is:pi-other')
+ })
+
+ it('returns all queries', () => {
+ expect(getPrioritySearchQueries()).to.deep.equal([
+ 'is:pi-important',
+ 'is:pi-starred',
+ 'is:pi-other',
+ ])
+ })
+})