You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def update(conn, params) do
with {:ok, user} <- User.update(params) do
render(conn, "user.json", user: user)
end
end
Here with {:ok, user} <- User.update(params) do this line is left uncovered.
If we wish to cover this, or the cases where these type of blocks gets covered:
def update(conn, params) do
user = conn.assigns.user
updated_params =
params
|> Map.put("store_uuid", user.store_uuid)
|> Map.put("created_by", user.user_uuid)
with {:ok, user} <- User.update(params) do
render(conn, "user.json", user: user)
end
end
The text was updated successfully, but these errors were encountered:
For example if working on the user update:
Here with
{:ok, user} <- User.update(params) do
this line is left uncovered.If we wish to cover this, or the cases where these type of blocks gets covered:
The text was updated successfully, but these errors were encountered: