Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add regression test case
  • Loading branch information
fatso83 committed Aug 7, 2017
1 parent ec74e94 commit ece1ee5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/issues/issues-test.js
Expand Up @@ -320,4 +320,25 @@ describe("issues", function () {
assert.equals(this.stub.withArgs("arg").lastCall.returnValue, "return value");
});
});

describe("#1512", function () {
var sandbox;

beforeEach(function () {
sandbox = sinon.sandbox.create();
});

afterEach(function () {
sandbox.restore();
});

it("can stub methods on the prototype", function () {
var proto = { someFunction: function () {} };
var instance = Object.create(proto);

var stub = sandbox.stub(instance, "someFunction");
instance.someFunction();
assert(stub.called);
});
});
});

0 comments on commit ece1ee5

Please sign in to comment.