Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for sandbox restore() #19

Merged
merged 1 commit into from
Apr 29, 2017
Merged

Fix for sandbox restore() #19

merged 1 commit into from
Apr 29, 2017

Conversation

jniemin
Copy link
Contributor

@jniemin jniemin commented Apr 28, 2017

Implementation for sandbox mock was not proper (#15, #18). It did not properly restore mongoose model to original state. Here is a test and fix for it

@gaguirre
Copy link
Collaborator

Great @jniemin! Let me review it
Also, could you rebase with master? (instead of merge)

lib/index.js Outdated
@@ -36,4 +36,12 @@ var newMock = function mock(object) {
};

sinon.mock = newMock;
sinon.sandbox.mock = newMock;
sinon.sandbox.mock = function(object){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can name this function sandboxMock so it would be easier to debug.

@jniemin
Copy link
Contributor Author

jniemin commented Apr 28, 2017

I renamed sandbox function and rebased it properly

@gaguirre
Copy link
Collaborator

Excellent! Thanks @jniemin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants