/**
  * @testdox A user who can only create records in one table can still use the change-tracker (i.e. creating changesets is not influenced by standard grants).
  * @test
  */
 public function minimal_grants()
 {
     global $current_user;
     $current_user->remove_cap('promote_users');
     $current_user->add_role('subscriber');
     $grants = new Grants();
     $grants->set(array('test_table' => array(Grants::READ => array('subscriber'), Grants::CREATE => array('subscriber'))));
     // Assert that the permissions are set as we want them.
     $this->assertTrue(Grants::current_user_can(Grants::CREATE, 'test_table'));
     $this->assertFalse(Grants::current_user_can(Grants::CREATE, ChangeTracker::changesets_name()));
     $this->assertFalse(Grants::current_user_can(Grants::CREATE, ChangeTracker::changes_name()));
     // Succcessfully save a record.
     $test_table = $this->db->get_table('test_table');
     $rec = $test_table->save_record(array('title' => 'One', 'changeset_comment' => 'Testing.'));
     $this->assertEquals(1, $rec->id());
 }