public function PublishContentCheckboxTests::testAccessNodeAdd in Publish Content 7
Test access to the node add page is working.
File
- tests/
publishcontent.test, line 728 - Unit tests for Publish Content module.
Class
- PublishContentCheckboxTests
- Test permissions with the tab method.
Code
public function testAccessNodeAdd() {
$type = 'page';
$this
->enablePublishContentForContentType($type);
$web_user_1 = $this
->drupalCreateUser(array(
'access content',
'view own unpublished content',
'create ' . $type . ' content',
'publish editable content',
'unpublish editable content',
));
$this
->drupalLogin($web_user_1);
$this
->drupalGet('node/add/' . $type);
$this
->assertResponse(200);
$this
->assertFieldChecked('edit-status', t('Ensure the publish checkbox is available.'));
}