Closed niroigen closed 5 years ago
Not sure if this should also be tested, because I'm thinking there should be an API endpoint for changing a user's profile and that would save all the information that the user would like to modify
This is a minor addition to the model, no need to test it. Regarding the view, it depends on what kind of view we are inheriting (class, function). If there is something that shouldn't be possible to do, we should test it's not possible (can the user update his profile to the same endpoint)?
Not sure if this should also be tested, because I'm thinking there should be an API endpoint for changing a user's profile and that would save all the information that the user would like to modify
This is a minor addition to the model, no need to test it. Regarding the view, it depends on what kind of view we are inheriting (class, function). If there is something that shouldn't be possible to do, we should test it's not possible (can the user update his profile to the same endpoint)?
When you mean the same endpoint, do you mean something like client.get(reverse('main:my_account-detail'))
vs client.post(reverse('main:my_account-detail))
? Because yes, that is possible
Not sure if this should also be tested, because I'm thinking there should be an API endpoint for changing a user's profile and that would save all the information that the user would like to modify