assertThat(tickets.get(0).getAmountType(), is(TicketAmountType.UNLIMITED));
}
@Test
public void shouldModifyTicketAmountForUnpublishedEvent() throws Exception {
ActionProxy proxy = getActionProxy(POST, API_EVENT_MODIFY_TICKET);
loginAs(proxy, EVENT_OWNER_ID);
addValidSessionTokenToParameter(proxy);
addFormParameter(proxy, "eventId", UNPUBLISHED_EVENT_ID);
addFormParameter(proxy, "id[]", new String[] { UNPUBLISHED_EVENT_TICKET_ID.toString() });
addFormParameter(proxy, "name[]", new String[] { "name" });
addFormParameter(proxy, "applicationStart[]", new String[] { "anytime" });
addFormParameter(proxy, "applicationStartDayBeforeEvent[]", new String[] { "0" });
addFormParameter(proxy, "customApplicationStartDate[]", new String[] { "2012-01-01 00:00" });
addFormParameter(proxy, "applicationEnd[]", new String[] { "till_time_before_event" });
addFormParameter(proxy, "applicationEndDayBeforeEvent[]", new String[] { "0" });
addFormParameter(proxy, "customApplicationEndDate[]", new String[] { "2012-01-01 00:00" });
addFormParameter(proxy, "reservationEnd[]", new String[] { "till_time_before_application" });
addFormParameter(proxy, "reservationEndHourBeforeApplication[]", new String[] { "0" });
addFormParameter(proxy, "customReservationEndDate[]", new String[] { "2012-01-01 00:00" });
addFormParameter(proxy, "priceType[]", new String[] { "free" });
addFormParameter(proxy, "price[]", new String[] { "0" });
// Changed to limited.
addFormParameter(proxy, "amountType[]", new String[] { "limited" });
addFormParameter(proxy, "amount[]", new String[] { "10" });
proxy.execute();
assertResultOK(proxy);
EventEx modified = loadEventEx(UNPUBLISHED_EVENT_ID);
List<EventTicket> tickets = modified.getTickets();