1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2024-11-25 07:42:47 +01:00
Commit Graph

86 Commits

Author SHA1 Message Date
Daniel Starzmann
2d4cb5ed1c Improve sql query performance by removing unused payload
Signed-off-by: Daniel Starzmann <daniel@starze.de>
2023-04-16 11:13:30 +02:00
Benjamin Brahmer
a70d155ce4 Set lastmodified in read all
if this is not updated the API won't work correctly and we get sync errors.
Adjust test to use item api

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-04-05 19:43:02 +02:00
Benjamin Brahmer
a7f69c4b63 fix readAll
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-31 16:14:18 +02:00
Benjamin Brahmer
1a76e03f5a fix unittest
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-21 16:39:07 +02:00
Benjamin Brahmer
1784406fa7
Fix deprecation warnings from Nextcloud. (#1869)
* don't use private class anymore
* execute is deprecated
* fix migration execute statement
* fix unittest

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 10:07:43 +02:00
Benjamin Brahmer
a3d70f50aa Fix Test and adjust code
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 09:14:27 +02:00
Benjamin Brahmer
5af0cb6e22 update last_modified when marking an item as read
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

this way it works

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

add changelog entry

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

Partly fix test

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

test passing

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-05-02 09:56:12 +02:00
Sean Molenaar
a52eee5671 chore: use executeStatement instead of executeUpdate
Signed-off-by: Sean Molenaar sean@seanmolenaar.eu
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-11-18 14:10:57 +01:00
anoy
ed066a8129 adapt tests to QBMapper changes in NC22
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-07-17 20:31:29 +02:00
Sean Molenaar
74f09ee716 db: no longer order by items.last_modified
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-05-27 19:12:55 +02:00
Sean Molenaar
111bf5fff2 DB: only sort on item IDs
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-04-14 13:56:54 +02:00
Marco Nassabain
391dd25293 🩹 Fix rebase issues
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
a6f9e4495b 🩹 Fix rebase errors
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
307534cc29 Added test for sharedByDisplayName field
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
bbdd95c30d 🔥 Remove UserManager code from ItemMapper & tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
c2c92a3f5a 🩹 Fix issues after rebase
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
af84bbf204 Item: update tests - include sharer display name
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
b0c42e4cd7 ♻️ Item: Remove isShared
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
2cba1e4146 🧹 Cleanup code, remove spaces, rename variables
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
25e2efd54a Update ItemTest - remove sharedWith field
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
2ee5112760 🔥 Remove old share logic from tests & old tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
80dec257c2 Update find shared items tests
- testFindAllSharedWithUser
- testFindAllSharedWithUserHideRead
- testFindAllSharedWithUserSearch

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
8de50d44b6 ItemMapperPaginatedTest: update tests
Adapted folder/feed/item tests to take account for shared data
- testFindAllItemsStarredSearch
- testFindAllFeed
- testFindAllFeedInverted
- testFindAllFeedHideRead
- testFindAllFeedSearch
- testFindAllFolderIdNull
- testFindAllFolderHideRead
- testFindAllFolderHideReadInvertOrder
- testFindAllFolderSearchId

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
ee49a1d1cc Fix tests in ItemMapperPaginatedTest:
- testFindAllItemsInvalid
- testFindAllItemsFullInverted
- testFindAllItemsUnread
- testFindAllItemsStarred

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
abba7386ee Fix tests in ItemMapperAfterTest:
- testFindAllAfterStarred
- testFindAllAfterAll
- testFindAllAfterInvalid

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
6dbf64fa9d Fix tests in ItemMapperAfterTest:
- testFindAllInFeedAfter
- testFindAllInFeedAfterHideRead
- testFindAllInFolderAfter
- testFindAllInFolderAfterHideRead
- testFindAllAfterUnread

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
702d611f35 🔀 Resolving merge: moving shared tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
85dbed9ffa 🧹 Cleanup test files: added new lines
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
dd4617d368 Fix findFromUser, testFindAllFromUserWithParams, testFindAllFromUser
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
5a12e50cca Fix testFindForUserByGUIDHash
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
2c59331316 Fix testNewest
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
306f97d656 Fix tests testFindAllInFolderAfterHideRead, testFindAllInFolderAfter, testFindAllInFeedAfterHideRead, testFindAllInFeedAfter
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
6775fe541e Fix testFindAllItemsStarredSearch, testFindAllItemsStarred, testFindAllItemsUnread
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
e7ec222c1d Fix testFindAllItemsInvalid, testFindAllAfterInvalid, testFindAllAfterStarred, testFindAllAfterUnread
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
d6b32cf674 fix test findAllFeed
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
d314e8b495 Fix test findAllFeedSearch and findAllFeedHideRead
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
f59fe96105 Fix test findAllFolderIdNull and findAllFolderHideRead
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
319b15a655 Fix test findAllFolderHideReadInvertOrder
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
8b51ee583e Fix test FindAllFolderSearchId
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
818736c2be fix test readAll
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
fc8670f5be ItemMapperTest: add tests for findAllSharedAfter
- testFindAllSharedAfter
- testFindAllSharedAfterHideRead

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
cbe1ca6b4d ItemMapperTest: test findAllSharedWithUser func
- testFindAllSharedWithUser
- testFindAllSharedWithUserHideRead
- testFindAllSharedWithUserSearch

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
f9f25ddbd2 Add tests setSharedBy and setSharedWith
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
4133e68c8e Update tests to contain share data
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Paul Tirk
1208dc8d71 add tests for 'toAPI2' method
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Sean Molenaar
90702dd297 DB: Use boolean parameter for unread/starred
Issue GH-1278

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-04-06 12:43:24 +02:00
Sean Molenaar
951f3eb7ee DB: Allow negative limits
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-04-05 19:18:19 +02:00
Sean Molenaar
78dce7ffe1 DB: Updates should use set()
Issue GH-1211

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-31 22:39:00 +02:00
Sean Molenaar
baf1ca8ec9 DB: Don't show deleted feed items
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-23 21:11:25 +01:00
Marco Nassabain
5ab065bbff Item: update search index test to use categories
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-03-17 08:58:42 +01:00