Skip to content
This repository was 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
jankuca wants to merge 1 commit into
angular:masterfrom
jankuca:resource_intercept_success
Closed

fix($resource): pass interceptor-transformed value to both success callbacks and promises#3823
jankuca wants to merge 1 commit into
angular:masterfrom
jankuca:resource_intercept_success

Conversation

@jankuca
Copy link
Copy Markdown
Contributor

@jankuca jankuca commented Aug 30, 2013

Comment thread test/ngResource/resourceSpec.js Outdated
Copy link
Copy Markdown
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
Copy Markdown
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