function VudNodeWebTestCase::testViewWidget in Vote Up/Down 6.3
Same name and namespace in other branches
- 6.2 vud_node/vud_node.test \VudNodeWebTestCase::testViewWidget()
- 7 vud_node/vud_node.test \VudNodeWebTestCase::testViewWidget()
Test visibility of the widget.
File
- vud_node/
vud_node.test, line 77 - Test file for Vote Up/Down Node.
Class
- VudNodeWebTestCase
- @file Test file for Vote Up/Down Node.
Code
function testViewWidget() {
$this
->enableMinimalVoting();
$this
->drupalLogin($this->admin_user);
$node = $this
->drupalCreateNode(array(
'type' => 'story',
));
$this
->drupalLogin($this->simple_user);
$this
->drupalGet("node/{$node->nid}");
$this
->assertRaw('<span class="updown-current-score">0</span>', t('Visible widget for user with permissions.'));
$this
->drupalLogin($this->restricted_user);
$this
->drupalGet("node/{$node->nid}");
$this
->assertNoRaw('<span class="updown-current-score">0</span>', t('Hidden widget for user without permissions'));
}