//==== SPEC_URL https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/calendar.html
//==== TEST_CRITERIA MMINA MAST MR
var t = async_test(document.title, {timeout: 5000}),
- event, summary, eventSearchSuccessCallback, returnedValue, eventCalendar;
+ event, summary, eventSearchSuccessCallback, eventSearchErrorCallback,
+ returnedValue, eventCalendar, filter;
t.step(function () {
summary = "updated summary";
event.summary = summary;
+ returnedValue = eventCalendar.update(event);
+ assert_equals(returnedValue, undefined,
+ "Incorect returned value from update method");
+
eventSearchSuccessCallback = t.step_func(function (events) {
- assert_equals(events[0].summary, summary, "Incorrect summary");
+ assert_type(events, "array", "events should be an array.");
+ assert_greater_than(events.length, 0, "Event was not found properly");
+ assert_equals(events[0].summary, summary,
+ "Event summary was not updated properly.");
cleanup(eventCalendar);
t.done();
});
+ eventSearchErrorCallback = t.step_func(function (error) {
+ assert_unreached("find() error callaback invoked: " + error.name + ": " + error.message);
+ });
- returnedValue = eventCalendar.update(event);
- assert_equals(returnedValue, undefined,
- "Incorect returned value from update method");
-
- eventCalendar.find(eventSearchSuccessCallback);
+ filter = new tizen.AttributeFilter("id.uid", "EXACTLY", event.id.uid);
+ eventCalendar.find(eventSearchSuccessCallback, eventSearchErrorCallback, filter);
});
</script>