Skip to content

Instantly share code, notes, and snippets.

@derekhubbard
Created July 5, 2013 14:30
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 derekhubbard/5934928 to your computer and use it in GitHub Desktop.
Save derekhubbard/5934928 to your computer and use it in GitHub Desktop.
Verify api with jasmine. Must avoid hard coding base uri and policy number.
describe("GetPolicyTerm", function () {
var policyTerm;
beforeEach(function () {
policyTerm = new PolicyTerm();
});
it("should be able to retrieve a policy by policy number", function () {
var callback = jasmine.createSpy();
policyTerm.getPolicyTermByPolicyNumber("http://localhost:17186", "2013061401", callback);
waitsFor(function() {
return callback.callCount > 0;
});
runs(function() {
expect(callback).toHaveBeenCalled();
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment