Fix #1606 & #1712 Homepage does not display when deleting a feed

This commit is contained in:
Nicolas Le Goff
2014-03-03 19:07:59 +01:00
parent b8d2702975
commit 1ce11430fe
2 changed files with 27 additions and 20 deletions

View File

@@ -56,4 +56,16 @@ class Feed_CollectionTest extends PhraseanetPHPUnitAuthenticatedAbstract
$this->assertTrue($feed->is_public());
}
}
public function testLoadPublicFeedsAfterDelete()
{
$feed = Feed_Adapter::create(self::$DI['app'], self::$DI['user'], self::$title, self::$subtitle);
$feed->set_public(true);
$coll = Feed_Collection::load_public_feeds(self::$DI['app']);
$countBefore = count($coll->get_feeds());
$feed->delete();
$coll = Feed_Collection::load_public_feeds(self::$DI['app']);
$this->assertGreaterThan(count($coll->get_feeds()), $countBefore);
$feed->delete();
}
}