diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2021-02-20 14:02:35 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-02-23 15:06:02 +0100 |
commit | 4e4108aaf80e2e49b4ca217b56065c49cf7347f4 (patch) | |
tree | c668f26cee4d4bca3481ce2361d8d705eba1c596 /tests | |
parent | 88783899859b3e149cc034bd01893c1c9e3cc62e (diff) |
Feed: Fix rename moving file
Issue #1181
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Unit/Controller/FeedControllerTest.php | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/tests/Unit/Controller/FeedControllerTest.php b/tests/Unit/Controller/FeedControllerTest.php index cf7bc501e..fde821088 100644 --- a/tests/Unit/Controller/FeedControllerTest.php +++ b/tests/Unit/Controller/FeedControllerTest.php @@ -636,9 +636,52 @@ class FeedControllerTest extends TestCase $feed = $this->getMockBuilder(Feed::class) ->getMock(); + $feed->expects($this->never()) + ->method('setFolderId'); + + $feed->expects($this->once()) + ->method('setPinned') + ->with(true); + + $feed->expects($this->once()) + ->method('setFullTextEnabled') + ->with(false); + + + $feed->expects($this->once()) + ->method('setUpdateMode') + ->with(1); + + + $feed->expects($this->never()) + ->method('setOrdering') + ->with(true); + + + $feed->expects($this->never()) + ->method('setTitle') + ->with(true); + + $this->feedService->expects($this->once()) + ->method('find') + ->with($this->uid, 4) + ->will($this->returnValue($feed)); + + $this->feedService->expects($this->once()) + ->method('update') + ->with($this->uid, $feed); + + $this->class->patch(4, true, false, 1); + } + + public function testPatchFolder() + { + $feed = $this->getMockBuilder(Feed::class) + ->getMock(); + $feed->expects($this->once()) ->method('setFolderId') - ->with(null); + ->with(5); $feed->expects($this->once()) ->method('setPinned') @@ -672,7 +715,7 @@ class FeedControllerTest extends TestCase ->method('update') ->with($this->uid, $feed); - $this->class->patch(4, true, false, 1); + $this->class->patch(4, true, false, 1, null, 5); } public function testPatchDoesNotExist() |