Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix($resource): pass interceptor-transformed value to both success callbacks and promises #3823

Closed
wants to merge 1 commit into from

Conversation

jankuca
Copy link
Contributor

@jankuca jankuca commented Aug 30, 2013

});

$httpBackend.flush();
expect(a === b).toBe(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

you can just write expect(a).toBe(b), but that is still a weak tests as both could be undefined and you wouldn't know it. a better test would be to to create var transformedValue = {a: 123}; and return that in the transformResponse fn. Then check that both a and b are transformedValue.

@ghost ghost assigned btford Oct 2, 2013
@btford
Copy link
Contributor

btford commented Oct 3, 2013

Landed as e36e28e.

@btford btford closed this Oct 3, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants