*/
class api_v3_GroupOrganizationTest extends CiviUnitTestCase {
protected $_apiversion;
- public $_eNoticeCompliant = True;
function get_info() {
return array(
protected function setUp() {
$this->_apiversion = 3;
parent::setUp();
- $this->_groupID = $this->groupCreate(NULL);
+ $this->_groupID = $this->groupCreate();
$this->_orgID = $this->organizationCreate(NULL);
}
$result = $this->callAPIAndDocument('group_organization', 'create', $params, __FUNCTION__, __FILE__);
}
+ /**
+ * CRM-13841 - Load Group Org before save
+ */
+ public function testGroupOrganizationCreateTwice() {
+ $params = array(
+ 'organization_id' => $this->_orgID,
+ 'group_id' => $this->_groupID, );
+ $result = $this->callAPISuccess('group_organization', 'create', $params);
+ $result2 = $this->callAPISuccess('group_organization', 'create', $params);
+ $this->assertEquals($result['values'], $result2['values']);
+ }
/**
* check with empty params array
*/