P. Douglas Reeder
unread,Aug 25, 2010, 5:14:52 PM8/25/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jasmine-webos
I'd like to put a spy on appController.showBanner(), but it's not
clear how to do this. When I write a spec:
describe("creating recurring item", function () {
it("should banner recur without leadTime", function () {
spyOn(Mojo.Controller.AppController, 'showBanner');
var item = new Item({summaryText: "recurring item", dueDate:
Date.UTC(2010, 3, 15, 9, 15), recur: "RRULE:FREQ=DAILY", work: 1});
expect(Mojo.Controller.AppController.showBanner).toHaveBeenCalled();
});
});
the spec fails with the message
showBanner() method does not exist
Do I need to do something different when spying on the
AppController?
(I note that a do-nothing showBanner is defined on
jasmine.webos.StubSceneController, which is odd, because showBanner is
defined on AppControler, not SceneController.)