mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Probably test for feed redirection bug
This commit is contained in:
parent
cfef75ccba
commit
16530b9a66
3 changed files with 15 additions and 1 deletions
|
@ -3,7 +3,7 @@ Version 0.8.1 (2019-??-??)
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
- Don't crash updating feeds cached solely via ETag
|
- Don't crash updating feeds cached solely via ETag
|
||||||
- Don't update feed URLs when fetching
|
- Don't fail adding a feed which collides with another via redirection
|
||||||
|
|
||||||
Version 0.8.0 (2019-07-26)
|
Version 0.8.0 (2019-07-26)
|
||||||
==========================
|
==========================
|
||||||
|
|
|
@ -223,6 +223,14 @@ trait SeriesSubscription {
|
||||||
Arsse::$db->subscriptionAdd($this->user, $url);
|
Arsse::$db->subscriptionAdd($this->user, $url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testAddADuplicateSubscriptionViaRedirection() {
|
||||||
|
$url = "http://localhost:8000/Feed/Parsing/Valid";
|
||||||
|
Arsse::$db->subscriptionAdd($this->user, $url);
|
||||||
|
$subID = $this->nextID("arsse_subscriptions");
|
||||||
|
$url = "http://localhost:8000/Feed/Fetching/RedirectionDuplicate";
|
||||||
|
$this->assertSame($subID, Arsse::$db->subscriptionAdd($this->user, $url));
|
||||||
|
}
|
||||||
|
|
||||||
public function testAddASubscriptionWithoutAuthority() {
|
public function testAddASubscriptionWithoutAuthority() {
|
||||||
$url = "http://example.com/feed1";
|
$url = "http://example.com/feed1";
|
||||||
Phake::when(Arsse::$user)->authorize->thenReturn(false);
|
Phake::when(Arsse::$user)->authorize->thenReturn(false);
|
||||||
|
|
6
tests/docroot/Feed/Fetching/RedirectionDuplicate.php
Normal file
6
tests/docroot/Feed/Fetching/RedirectionDuplicate.php
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?php return [
|
||||||
|
'code' => 302,
|
||||||
|
'fields' => [
|
||||||
|
"Location: http://localhost:8000/Feed/Parsing/Valid",
|
||||||
|
],
|
||||||
|
];
|
Loading…
Reference in a new issue