public function OpenAtriumAccessAllTestCase::testAddSpaces in Open Atrium Core 7.2
File
- modules/
oa_access/ tests/ oa_access.test, line 883 - Functional tests for the Open Atrium Access module.
Class
- OpenAtriumAccessAllTestCase
- Functional tests for permissions that default to 'All' for the Open Atrium Access module.
Code
public function testAddSpaces() {
// Straight off the bat, enable
module_enable(array(
'oa_access_test_all',
));
// Create an admin user and login.
$account = $this
->oaCreateUser(array(
'create oa_space content',
));
$this
->drupalLogin($account);
// Create a new Space that could hold teams some day.
$space1 = $this
->oaCreateNode(array(
'title' => 'Space A',
'type' => 'oa_space',
'uid' => $account->uid,
));
// Check that default access was added.
$this
->assertEqual(oa_access_get_group_permissions(array(
$space1->nid,
)), array(
$space1->nid => array(
'oa_access_test_all' => array(
'permission that defaults to all for oa_access_test_all',
),
),
));
}