AdrianFerJ / v2go-api

V2go web app's repo contains client and server apps (django and angular), and infastructure setup for both apps, postgres, redis, and nginx using docker
0 stars 0 forks source link

Allowing users to add a nickname to their EV #57

Closed niroigen closed 5 years ago

niroigen commented 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

AdrianFerJ commented 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)?

niroigen commented 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)?

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