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

readyStateChange is not called when useFilters is true. #75

Closed
ghost opened this issue Jan 20, 2012 · 2 comments
Closed

readyStateChange is not called when useFilters is true. #75

ghost opened this issue Jan 20, 2012 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 20, 2012

fake_xml_http_request.js

        open: function open(method, url, async, username, password) {
            ...

            if(sinon.FakeXMLHttpRequest.useFilters === true) {
                var xhrArgs = arguments;
                var defake = some(FakeXMLHttpRequest.filters,function(filter) {
                    return filter.apply(this,xhrArgs)
                });
                if (defake) { sinon.FakeXMLHttpRequest.defake(this,arguments); }
            } else {
                this.readyStateChange(FakeXMLHttpRequest.OPENED);
            }
        },

I think "this.readyStateChange" should be called when "useFilters" is true and "defake" is false.

@timruffles
Copy link
Contributor

I'll have a look at this. From a first look I think you're quite right - if we're using filters, but not de-faking, we should be in the default branch,

cjohansen added a commit that referenced this issue Feb 1, 2012
@cjohansen
Copy link
Contributor

Github marks the issue as closed on Tim's pull request, I merged it, yet... It's still open :|

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

No branches or pull requests

2 participants