From 09f2d3266bffc78d12d8666e2b3202dedd2cfc8f Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 24 Oct 2009 21:39:40 +0000 Subject: #609152 by redndahead, bleen18 and jim0203: Ensure node filter page validates that there were rows selected. (with tests) --- modules/node/node.test | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/node/node.test') diff --git a/modules/node/node.test b/modules/node/node.test index 71a39801c..016ce5619 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -967,6 +967,9 @@ class NodeAdminTestCase extends DrupalWebTestCase { * Create 3 nodes and test if they are listed on the node admistration page. */ function testNodeAdmin() { + $this->drupalPost('admin/content', array(), t('Update')); + $this->assertText(t('No items selected.'), t('Clicking update with no nodes displays error message on the node administration listing.')); + $node1 = $this->drupalCreateNode(array('type' => 'article', 'status' => 1)); $node2 = $this->drupalCreateNode(array('type' => 'article', 'status' => 0)); $node3 = $this->drupalCreateNode(array('type' => 'page')); @@ -974,6 +977,9 @@ class NodeAdminTestCase extends DrupalWebTestCase { $this->drupalGet('admin/content'); $this->assertText($node1->title[FIELD_LANGUAGE_NONE][0]['value'], t('Node appears on the node administration listing.')); + $this->drupalPost('admin/content', array(), t('Update')); + $this->assertText(t('No items selected.'), t('Clicking update with no selected nodes displays error message on the node administration listing.')); + // Filter the node listing by status. $edit = array( 'filter' => 'status', -- cgit v1.2.3