Skip to content

Instantly share code, notes, and snippets.

@shawnmclean
Created August 31, 2014 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawnmclean/9ce025a39f2412a83a71 to your computer and use it in GitHub Desktop.
Save shawnmclean/9ce025a39f2412a83a71 to your computer and use it in GitHub Desktop.
[TestClass]
public class AccountsTests : TestBase
{
[TestMethod]
public async Task Register_Returns_Successfull()
{
var registerModel = new RegisterModel
{
Email = Constants.USER_EMAIL,
FirstName = "Shawn",
LastName = "Mclean",
Password = Constants.USER_PASSWORD
};
var content = new StringContent(Json.Encode(registerModel), Encoding.Default, "application/json");
HttpResponseMessage response = await server.CreateRequest("/v1/Account/Register")
.AddHeader("ApiKey", Constants.API_KEY)
.And(message => { message.Content = content; }).PostAsync();
Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment