Skip to content

Instantly share code, notes, and snippets.

@gmoeck
Created January 10, 2011 14:50
Show Gist options
  • Save gmoeck/772850 to your computer and use it in GitHub Desktop.
Save gmoeck/772850 to your computer and use it in GitHub Desktop.
var task;
module("Given an existing task", {
setup: function() {
SC.RunLoop.begin();
Todos.main();
task = Todos.store.createRecord(Todos.Task, {
'description': 'Some Task',
'isDone': false
});
SC.RunLoop.end();
},
teardown: function() {
SC.RunLoop.begin();
Todos.getPath('mainPage.mainPane').remove();
Todos.store.reset();
SC.RunLoop.end();
}
});
test("When looking at the list of tasks", function() {
var todosList = Todos.getPath('mainPage.mainPane.middleView.contentView').get('content');
equals(todosList.indexOf(task) != -1, true, "Then I should see the task in the list");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment