Skip to content

Instantly share code, notes, and snippets.

@jlsherrill
Created September 6, 2013 20:34
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 jlsherrill/6469609 to your computer and use it in GitHub Desktop.
Save jlsherrill/6469609 to your computer and use it in GitHub Desktop.
it("Performs a package update", function(){
$scope.packageAction.actionType = "packageUpdate";
$scope.packageAction.term = "foo";
$scope.performPackageAction();
expect(SystemPackage).toHaveBeenCalledWith('update', {uuid: mockSystem.uuid, packages: ["foo"]})
});
@waldenraines
Copy link

   it("Performs a package update", function() {
        spyOn(SystemPackage, 'update'); 
        $scope.packageAction.actionType = "packageUpdate";
        $scope.packageAction.term = "foo";
        $scope.performPackageAction();
        expect(SystemPackage.update).toHaveBeenCalledWith({uuid: mockSystem.uuid, packages: ["foo"]})
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment