Created
January 10, 2011 14:50
-
-
Save gmoeck/772850 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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