summaryrefslogtreecommitdiff
path: root/modules/book/book.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/book/book.test')
-rw-r--r--modules/book/book.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/book/book.test b/modules/book/book.test
index df7b2d6fd..3dbfa4d0c 100644
--- a/modules/book/book.test
+++ b/modules/book/book.test
@@ -153,3 +153,33 @@ class BookTestCase extends DrupalWebTestCase {
return $node;
}
}
+
+class BookBlockTestCase extends DrupalWebTestCase {
+ function getInfo() {
+ return array(
+ 'name' => t('Block availability'),
+ 'description' => t('Check if the book navigation block is available.'),
+ 'group' => t('Book'),
+ );
+ }
+
+ function setUp() {
+ parent::setUp('book');
+
+ // Create and login user
+ $admin_user = $this->drupalCreateUser(array('administer blocks'));
+ $this->drupalLogin($admin_user);
+ }
+
+ function testBookNavigationBlock() {
+ // Set block title to confirm that the interface is availble.
+ $this->drupalPost('admin/build/block/configure/book/navigation', array('title' => $this->randomName(8)), t('Save block'));
+ $this->assertText(t('The block configuration has been saved.'), t('Block configuration set.'));
+
+ // Set the block to a region to confirm block is availble.
+ $edit = array();
+ $edit['book_navigation[region]'] = 'footer';
+ $this->drupalPost('admin/build/block', $edit, t('Save blocks'));
+ $this->assertText(t('The block settings have been updated.'), t('Block successfully move to footer region.'));
+ }
+}