1
0
Fork 0
Commit Graph

707 Commits

Author SHA1 Message Date
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 0fdd88df55 🧹 ShareService: rename $url to $urlGenerator
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain a754b437e0 Update test to include localization
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain 7f3c63a2a4 🎨 ShareService: update dummy feed URL
- add IURLGenerator DI
- update url to "http://serverurl/news/sharedwithme"
- updated tests: added DI + adapted expected url

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain 920ae54a2c 🌐 ShareService: Localize dummy feed title
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 5c5578b16e Update ItemServiceTest: remove share tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain e6eb878c4f WIP add ShareServiceTest
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 88fa9886ae Update ItemController share tests
- use ShareService and shareItemWithUser function

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain d275a5b9e7 🩹 Patch ItemControllerTest to mock shareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain 409c835433 🩹 Patch ItemController + test to use ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain dd818c6203 🚑 Fix circular inclusion: create ShareService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain 54a228eca5 Add FeedService DI into ItemService in tests
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 f708e40b75 ✏️ Fix share test name typo
- testFindAllShared => testFindAllSharedWithUser

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
WENDLING NICOLAS 376f866a83 Fix those tests -> ItemControllerTest:
-  testIndexForFeed
- testIndexForFolder
- testIndexForShared
- testIndexForOther
- testIndexSearchFeed
- testNewItemsFeed
- testNewItemsFolder
- testNewItemsShared
- testNewItemsOther

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
WENDLING NICOLAS 890b8fa1df Fix FeedControllerTest tests
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
Marco Nassabain 5c359a8d42 ItemServiceTest: test share functions
- testFindAllShared
- testFindAllNewShared
- testSharedCount

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain 14c6685344 ItemServiceTest: test share function
- testShare
- testShareDoesNotExist

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain 46cc069863 ItemControllerTest: added share tests (WIP)
- testIndexForShared
- testNewItemShared

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain 91c034c72f Fix ItemController share tests
- testShare
- testShareDoesNotExist

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain 89d7293e84 Add tests: testFindAllShared, testShare + ...
+ testShareDoesNotExist

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
WENDLING NICOLAS 615668d688 Unary test for itemShare from itemService class
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
Paul Tirk 8b3c1341e8 return error if new folder name is missing on update
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk b45426937e return error if no folder name is provided
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk 05b7ed7994 remove unused service exceptions & allow equally named folders
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk dff855fba5 change method names to follow nextcloud convention
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk a8dddd72fb linting
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk cce826fc72 fix wrong parentheses
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk eb849a9be5 do not return existing folders when an API request error occurs
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk 06a45387ef lint & add missing copyright/author information
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2021-04-08 10:23:11 +02:00
Paul Tirk 5e4c927017 add folder api v2
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 7a2b3ccfa8 chore: Improve test coverage
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-30 12:58:47 +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
Jimmy Huynh 3ca55613b6 Add tests of categories
Signed-off-by: Jimmy Huynh <linkatox@gmail.com>
2021-03-17 08:58:42 +01:00
Marco Nassabain b4aab69304 FeedFetcher: update tests to include categories
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-03-17 08:58:42 +01:00
Marco Nassabain 226a7d0dfb Item: update tests to include categories
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-03-17 08:58:42 +01:00
Sean Molenaar bcdeb55fcb Actions: Integration tests using bats
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-03-01 21:13:44 +01:00
Sean Molenaar 9d5d35ce23 DB: Fix offset quotes
Issue GH-1200

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-27 15:12:59 +01:00
Sean Molenaar bf1e71f1a7 DB: Use ID as offset in item queries
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-23 17:16:20 +01:00
Sean Molenaar 4e4108aaf8 Feed: Fix rename moving file
Issue #1181

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-23 15:06:02 +01:00
Benjamin Brahmer 30ce6196b8 Add phpstan plugins
remove leftovers from psalm
move phpstan and phpcs to static code check

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-02-20 14:07:50 +01:00
Sean Molenaar 4a107b3d53 General: Fix folder query
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-20 13:57:09 +01:00
Benjamin Brahmer 6cd83ea1da remove unused lastModified from feed fetcher
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-02-16 11:01:10 +01:00
Benjamin Brahmer c09b4d8d33 prefer the feeds logo over the favicon
The logo of the feed is prefered if it is a square picture,
else the favicon is returned.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
2021-02-16 10:16:15 +01:00
anoy 8ca7ef7e49 update sorting column
follow-up for b4fa772bc5 (#1056)

Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-02-14 17:15:46 +01:00
Sean Molenaar b4fa772bc5 Remove V1 item API
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-13 13:22:57 +01:00
Sean Molenaar 6e9e2512ea DB: Remove unused fields
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-05 09:37:17 +01:00
Sean Molenaar 5406086829 Psalm: Fix class loading 2021-02-05 07:27:11 +01:00
Sean Molenaar 66b4005b5e Controllers: Export Starred or unread instead of and
Fixes GH-1010

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-02-02 16:07:38 +01:00
Sean Molenaar 023c61b88f Mappers: Implement item purging
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-30 18:27:06 +01:00
Sean Molenaar cb10dd1d83 Base: Update psalm definition and dependency list
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-26 16:06:47 +01:00
Benjamin Brahmer a4d8285a0b ignore new errors
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-01-26 08:42:38 +01:00
Sean Molenaar 8fa1537cbf Fetcher: Update client and add test
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-20 22:52:09 +01:00
Benjamin Brahmer 54e3b2e57a ignore current issues but catch new ones
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2021-01-20 10:26:36 +01:00
Sean Molenaar 582c4d11fa Controllers: Fetch feed after creating
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-18 20:15:13 +01:00
anoy c67feb8d8d fix TypeError caused by type conversion in controller
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-01-17 17:56:37 +01:00
anoy 8b3516a949 fix opened state of folders is not restored
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-01-13 19:23:46 +01:00
Sean Molenaar e5d56f2c2e Fix getUnreadOrStarredType
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2021-01-12 13:29:08 +01:00
Sean Molenaar f7b43501af Fix nc 21 phpunit issue 2021-01-12 13:29:08 +01:00
anoy 8de3ad77fc remove deprecated colon prefix for parameters
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2021-01-11 09:32:23 +01:00
Sean Molenaar 05377d023e Remove PHPunit integration tests
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-12-30 11:21:44 +01:00
Sean Molenaar 27bd540580 Remove PHPunit integration tests
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-12-29 14:15:34 +01:00
Sean Molenaar 11f5904dd5 Fix mapper->find and empty user sessions
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-12-17 10:35:23 +01:00
Kevin Decherf 42ea24f2f4 Remove LastModified-based cursor when updating feeds
We remove the call to readSince() as some feeds push new articles with
pubDate prior to the lastModified time stored for these feeds (e.g.
lemonde.fr). As we go through all items of a feed again and again, we
prevent the constant update of an item's lastModified timestamp by
keeping the previous one if its fingerprint does not change.

Fixes #921

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-12-15 20:02:21 +01:00
Sean Molenaar 4ee3fcb781 Refactor User ID fetching and fix non-specific cleanup
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-12-08 13:58:12 +01:00
Sean Molenaar 8abddeab4f Remove usage of old Folder code
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-12-08 13:58:12 +01:00
Sean Molenaar 7effe4654b Unremove but deprecate User API
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-11-10 16:47:42 +01:00
Sean Molenaar 5bdc2df7f4 Fix unread count and related issues
Issue GH-924

Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2020-11-10 16:47:42 +01:00
anoy cb32a2c4ed remove deprecated YouTube playlist API
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
2020-11-07 09:57:20 +01:00