public function testUpdateKeyFails()
 {
     $key = $this->user->pkis->first();
     $count = Pki::count();
     $this->post('update_key', array(), array('id' => $key->id, 'pki' => array('name' => '', 'key' => $this->test_key)), array('user' => $this->user->id));
     $this->assertEquals($count, Pki::count(array('cache' => false)));
     $this->assertPartial('user/_key_form.php');
     $key2 = Pki::_find($key->id);
     $this->assertEquals($key2->name, $key->name);
     $this->assertEquals($key->key, $key2->key);
 }