Exemplo n.º 1
0
TEST_F(TestBCEntity, BadUpdate)
{
	TestResult tr;
	Json::Value entityData;
	entityData["address"] = "1309 Carling Ave";
	std::string badEntityId = "wakawaka";

	Json::FastWriter fw;
	m_bc->getEntityService()->updateEntity(badEntityId.c_str(), m_entityType, fw.write(entityData), "", -1, &tr);
	// TODO : put in the correct error code constant
	tr.runExpectFail(m_bc, HTTP_NOT_FOUND, 40332);
}
Exemplo n.º 2
0
TEST_F(TestBCGroup, LeaveGroup)
{
	Authenticate(UserA);
	CreateGroup();

	TestResult tr;
	m_bc->getGroupService()->leaveGroup(
		_groupId.c_str(),
		&tr);
	tr.run(m_bc);

	m_bc->getGroupService()->readGroup(
		_groupId.c_str(),
		&tr);
	tr.runExpectFail(m_bc, 400, 40345);

	Logout();
}