Skip to content

Instantly share code, notes, and snippets.

@alexanderfrankel
Last active December 28, 2015 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanderfrankel/a6427688648e29ef8375 to your computer and use it in GitHub Desktop.
Save alexanderfrankel/a6427688648e29ef8375 to your computer and use it in GitHub Desktop.
testing-in-karma-selecting-a-grade-spec.js
describe('selecting a grade', function() {
beforeEach(function() {
$scope.selectGrade("third");
});
it('sets selectedGrade to the grade that was selected', function() {
expect($scope.selectedGrade).to.equal("third");
});
it('sets selectedStudents to an array all students in the grade that was selected', function() {
expect($scope.selectedStudents).to.equal([{name:"alex", grade:"third"}]);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment