diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2022-01-18 19:45:43 +0300 |
---|---|---|
committer | Richard Steinmetz <richard@steinmetz.cloud> | 2022-01-18 19:45:43 +0300 |
commit | b4cb3d085bd6739b0ff345fb8b2f1a3f8e98f7ef (patch) | |
tree | 80e3347368556a9ea29c49abfd5b56895556d4b9 /src/tests | |
parent | db5fb32ee2e5db815d1446aaf0d814a2e08c5521 (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.js | 44 |
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', + ]) + }) +}) |