-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(users): Edit Profile client controller tests #1329
feat(users): Edit Profile client controller tests #1329
Conversation
Adds client-side tests for the Users Edit Profile client controller. 1) should have user context 2) should update the user profile 3) should set vm.error if error Related meanjs#1283
$scope.vm.updateUserProfile(true); | ||
$httpBackend.flush(); | ||
|
||
expect($scope.vm.success).toBe(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it sufficient to check if success is true? I think maybe it should also check if the properties of the mock users are really changed? Just trying to offer some feedback and learn a thing or 2 at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If our controller sets the success
view model property to `true', then we can assume our controller is behaving as expected. I don't see a need to test the actual back-end functionality here as well. We already have CRUD server tests for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I understand
@mleanos any progress with this? |
@ilanbiala I think this is ready. I've just been waiting for others to give their approval. Is there something specific that seems to be outstanding with this? |
@mleanos go ahead and merge then? |
Merged. Thanks @lirantal |
Adds client-side tests for the Users Edit Profile client controller.
Related #1283