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

test($resource): enhance test-case to verify correct behaviour #9628

Closed

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Oct 15, 2014

Previously, the test-case verified that calling toJson(), would remove the $promise and $resolved, but not that other $-prefixed properties would not be removed.

gkalpak referenced this pull request Oct 15, 2014
BREAKING CHANGE:

If you expected `$resource` to strip these types of properties before,
you will have to manually do this yourself now.
expect(cc.$promise).toBeDefined();
expect(cc.$resolved).toBe(true);
expect(cc.$myProp).toBe('still here');
Copy link
Contributor

Choose a reason for hiding this comment

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

this assertion is kind of meaningless since the item was defined just above

@gkalpak gkalpak force-pushed the $resource-enhance-toJson-test branch from f3d0ccd to 1a73a7b Compare October 15, 2014 14:43
Previously, the test-case verified that calling `toJson()`, would remove
the `$promise` and `$resolved`, but not that other `$`-prefixed properties
would not be removed.
@gkalpak gkalpak force-pushed the $resource-enhance-toJson-test branch from 1a73a7b to fff74ab Compare October 16, 2014 06:11
@IgorMinar
Copy link
Contributor

thanks

@IgorMinar IgorMinar closed this in c2fb4b6 Oct 17, 2014
@gkalpak gkalpak deleted the $resource-enhance-toJson-test branch October 17, 2014 08:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants