You are here

function HeartbeatAPI::testLogging in Heartbeat 7

Tests logging through API function calls.

File

tests/heartbeat.api.test, line 47
Heartbeat API tests.

Class

HeartbeatAPI
Test basic API.

Code

function testLogging() {
  $web_user = $this
    ->drupalCreateUser(array(
    'create page content',
    'edit own page content',
    'view heartbeat messages',
    'view Site activity stream',
  ));
  $this
    ->drupalLogin($web_user);

  // Create a node, logging should follow.
  $title = $this
    ->createSimpleNode();

  // Go to the public siteactivity with this user and check if it's there.
  $page = $this
    ->drupalGet('heartbeat/siteactivity');
  $this
    ->assertRaw($title, t('Node activity is shown.'));
}