Fixed issue on published events

filters

Change-Id: I1d0896c74deed31b31beba353e47e99cf6630236
This commit is contained in:
Sebastian Marcet 2018-05-10 14:57:56 -03:00
parent d316fceb92
commit 852a8bf33e
2 changed files with 37 additions and 0 deletions

View File

@ -181,6 +181,7 @@ final class DoctrineSummitEventRepository
public function getAllByPage(PagingInfo $paging_info, Filter $filter = null, Order $order = null)
{
$class = $filter->hasFilter('speaker')
|| $filter->hasFilter('speaker_id')
|| $filter->hasFilter('selection_status')
|| $filter->hasFilter('speaker_email')?
\models\summit\Presentation::class:

View File

@ -580,6 +580,42 @@ final class OAuth2SummitEventsApiTest extends ProtectedApiTest
$this->assertTrue(!is_null($events));
}
public function testGetORSpeakers($summit_id=24)
{
$params = array
(
'id' => $summit_id,
'filter' => [
'speaker_id==13987,speaker_id==12765'
]
);
$headers = array
(
"HTTP_Authorization" => " Bearer " . $this->access_token,
"CONTENT_TYPE" => "application/json"
);
$response = $this->action
(
"GET",
"OAuth2SummitEventsApiController@getScheduledEvents",
$params,
[],
[],
[],
$headers
);
$content = $response->getContent();
$this->assertResponseStatus(200);
$events = json_decode($content);
$this->assertTrue(!is_null($events));
}
public function testCurrentSummitPublishedEventsSummitTypeDesign()
{
$params = array