Skip to content
Snippets Groups Projects
Commit 8c58a319 authored by Dave Reid's avatar Dave Reid
Browse files

Issue #1066286: Added test to ensure 'Feed items' doesn't display on non-feed nodes.

parent 9232a314
No related branches found
No related tags found
No related merge requests found
......@@ -9,12 +9,12 @@
* Test Feed configuration.
*/
class FeedsExamplesFeedTestCase extends FeedsWebTestCase {
public static function getInfo() {
return array(
'name' => 'Feature: Feed',
'description' => 'Test "Feed" default configuration.',
'group' => 'Feeds',
'dependencies' => array('features', 'views'),
);
}
......@@ -22,7 +22,7 @@ class FeedsExamplesFeedTestCase extends FeedsWebTestCase {
* Enable feeds_news feature.
*/
public function setUp() {
parent::setUp(array('feeds_news'));
parent::setUp(array('features', 'views', 'feeds_news'));
}
/**
......@@ -31,6 +31,13 @@ class FeedsExamplesFeedTestCase extends FeedsWebTestCase {
public function test() {
$nid = $this->createFeedNode('feed', NULL, '', 'feed');
// Assert menu tabs for feed nodes does not show up on non-feed nodes.
$this->drupalGet("node/{$nid}/feed-items");
$this->assertResponse(200);
$not_feed_node = $this->drupalCreateNode();
$this->drupalGet("node/{$not_feed_node->nid}/feed-items");
$this->assertResponse(404);
// Assert results.
$count = db_query("SELECT COUNT(*) FROM {node} WHERE type = 'feed_item'")->fetchField();
$this->assertEqual($count, 10, 'Found the correct number of feed item nodes in database.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment