protected function OgSubscribe::_testWebUserUnsubscribeOg in Organic groups 6.2
Test user unsubscribed from a group.
1 call to OgSubscribe::_testWebUserUnsubscribeOg()
- OgSubscribe::testWebUserSubscribeOg in tests/
og.subscribe.test - Test a web user subscribing and unsubscribing a group.
File
- tests/
og.subscribe.test, line 113
Class
Code
protected function _testWebUserUnsubscribeOg($selective) {
$this
->drupalGet('og/unsubscribe/' . $this->nodes[$selective]->nid . '/' . $this->web_user->uid);
$this
->assertRaw(t('Are you sure you want to leave the group %title?', array(
'%title' => $this->nodes[$selective]->title,
)), t('Unsubscribe @selective group text found.', array(
'@selective' => $selective,
)));
// Click the join button.
$this
->drupalPost(NULL, array(), t('Leave'));
// Assert membership removal.
$this
->assertRaw(t('You left the group %group.', array(
'%group' => $this->nodes[$selective]->title,
)), t('Confirmation of unsubscribing @selective group text found.', array(
'@selective' => $selective,
)));
// Assert user is properly removed to group.
$this
->assertNotOgMember($this->web_user, $this->nodes[$selective]);
}