Created
August 31, 2014 19:28
-
-
Save shawnmclean/9ce025a39f2412a83a71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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