Skip to content

Commit

Permalink
updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Leandro Cervelin committed Mar 15, 2021
1 parent a9cac76 commit 77a540a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/CF.IntegrationTest/CustomerIntegrationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public async Task CreateCustomerOkTest()
var response = await client.PostAsync(CustomerUrl, content);
response.EnsureSuccessStatusCode();

Assert.True(response.StatusCode == HttpStatusCode.Created);
Assert.Equal(HttpStatusCode.Created, response.StatusCode);
}

[Fact]
Expand All @@ -58,7 +58,7 @@ public async Task CreateCustomerInvalidEmailTest()
var client = _factory.CreateClient();
var response = await client.PostAsync(CustomerUrl, content);

Assert.True(response.StatusCode == HttpStatusCode.BadRequest);
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
}

[Fact]
Expand All @@ -78,11 +78,11 @@ public async Task CreateCustomerExistingEmailTest()
var content = await CreateStringContent(dto);
var client = _factory.CreateClient();
var response = await client.PostAsync(CustomerUrl, content);
Assert.True(response.StatusCode == HttpStatusCode.Created);
Assert.Equal(HttpStatusCode.Created, response.StatusCode);

var clientNotOk = _factory.CreateClient();
var responseNotOk = await clientNotOk.PostAsync(CustomerUrl, content);
Assert.True(responseNotOk.StatusCode == HttpStatusCode.BadRequest);
Assert.Equal(HttpStatusCode.BadRequest, responseNotOk.StatusCode);
}

[Fact]
Expand All @@ -101,7 +101,7 @@ public async Task CreateCustomerRequiredEmailTest()
var client = _factory.CreateClient();
var response = await client.PostAsync(CustomerUrl, content);

Assert.True(response.StatusCode == HttpStatusCode.BadRequest);
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
}

[Fact]
Expand Down

0 comments on commit 77a540a

Please sign in to comment.