mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
TTRSS: correct feed renaming; fixes #128
This commit is contained in:
parent
760b13993b
commit
4d4e8e3580
2 changed files with 7 additions and 5 deletions
|
@ -911,7 +911,7 @@ class API extends \JKingWeb\Arsse\REST\AbstractHandler {
|
|||
throw new Exception("INCORRECT_USAGE");
|
||||
}
|
||||
$in = [
|
||||
'name' => $data['caption'],
|
||||
'title' => $data['caption'],
|
||||
];
|
||||
try {
|
||||
// try to rename the feed
|
||||
|
|
|
@ -599,9 +599,9 @@ LONG_STRING;
|
|||
['op' => "renameFeed", 'sid' => "PriestsOfSyrinx"],
|
||||
];
|
||||
$db = [
|
||||
[Arsse::$user->id, 42, ['name' => "Ook"]],
|
||||
[Arsse::$user->id, 2112, ['name' => "Eek"]],
|
||||
[Arsse::$user->id, 42, ['name' => "Eek"]],
|
||||
[Arsse::$user->id, 42, ['title' => "Ook"]],
|
||||
[Arsse::$user->id, 2112, ['title' => "Eek"]],
|
||||
[Arsse::$user->id, 42, ['title' => "Eek"]],
|
||||
];
|
||||
Phake::when(Arsse::$db)->subscriptionPropertiesSet(...$db[0])->thenReturn(true);
|
||||
Phake::when(Arsse::$db)->subscriptionPropertiesSet(...$db[1])->thenThrow(new ExceptionInput("subjectMissing"));
|
||||
|
@ -623,7 +623,9 @@ LONG_STRING;
|
|||
$this->assertResponse($exp, $this->req($in[6]));
|
||||
$this->assertResponse($exp, $this->req($in[7]));
|
||||
$this->assertResponse($exp, $this->req($in[8]));
|
||||
Phake::verify(Arsse::$db, Phake::times(3))->subscriptionPropertiesSet(Arsse::$user->id, $this->anything(), $this->anything());
|
||||
Phake::verify(Arsse::$db)->subscriptionPropertiesSet(...$db[0]);
|
||||
Phake::verify(Arsse::$db)->subscriptionPropertiesSet(...$db[1]);
|
||||
Phake::verify(Arsse::$db)->subscriptionPropertiesSet(...$db[2]);
|
||||
}
|
||||
|
||||
public function testRetrieveTheGlobalUnreadCount() {
|
||||
|
|
Loading…
Reference in a new issue