Skip to content

Commit

Permalink
Merge pull request NuGet#2183 from NuGet/anurse/2181-silenterroronema…
Browse files Browse the repository at this point in the history
…ilconflict

Fix NuGet#2181 by correcting the ModelError key name
  • Loading branch information
analogrelay committed Jun 2, 2014
2 parents 82a50e8 + f467ff0 commit 172ba7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/NuGetGallery/Controllers/UsersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public virtual async Task<ActionResult> ChangeEmail(AccountViewModel model)
}
catch (EntityException e)
{
ModelState.AddModelError("NewEmail", e.Message);
ModelState.AddModelError("ChangeEmail.NewEmail", e.Message);
return AccountView(model);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ public async Task DoesNotLetYouUseSomeoneElsesConfirmedEmailAddress()
}
});
Assert.False(controller.ModelState.IsValid);
Assert.Equal("msg", controller.ModelState["NewEmail"].Errors[0].ErrorMessage);
Assert.Equal("msg", controller.ModelState["ChangeEmail.NewEmail"].Errors[0].ErrorMessage);
}

[Fact]
Expand Down

0 comments on commit 172ba7e

Please sign in to comment.