From ec3e0096120e13b25157a36f5a6e12a26ffe60de Mon Sep 17 00:00:00 2001 From: "Matthew D. Groves" Date: Thu, 28 Sep 2023 10:37:08 -0400 Subject: [PATCH] #36 fixed tests that used the wrong routes --- .../Articles/Controllers/ArticlesControllerTests/GetTests.cs | 2 +- .../Controllers/ArticlesControllerTests/UnfavoriteTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Conduit/Conduit.Tests/Functional/Articles/Controllers/ArticlesControllerTests/GetTests.cs b/Conduit/Conduit.Tests/Functional/Articles/Controllers/ArticlesControllerTests/GetTests.cs index 8b9437b2ab..bcdca082ae 100644 --- a/Conduit/Conduit.Tests/Functional/Articles/Controllers/ArticlesControllerTests/GetTests.cs +++ b/Conduit/Conduit.Tests/Functional/Articles/Controllers/ArticlesControllerTests/GetTests.cs @@ -41,7 +41,7 @@ public async Task Get_an_article_that_was_just_created() var article = await _articleCollectionProvider.CreateArticleInDatabase(authorUsername: author.Username); // act - var response = await WebClient.GetAsync($"api/article/{article.Slug}"); + var response = await WebClient.GetAsync($"api/articles/{article.Slug}"); var responseString = await response.Content.ReadAsStringAsync(); var articleViewModel = responseString.SubDoc("article"); diff --git a/Conduit/Conduit.Tests/Functional/Articles/Controllers/ArticlesControllerTests/UnfavoriteTests.cs b/Conduit/Conduit.Tests/Functional/Articles/Controllers/ArticlesControllerTests/UnfavoriteTests.cs index 8b4cd573dd..615236b86d 100644 --- a/Conduit/Conduit.Tests/Functional/Articles/Controllers/ArticlesControllerTests/UnfavoriteTests.cs +++ b/Conduit/Conduit.Tests/Functional/Articles/Controllers/ArticlesControllerTests/UnfavoriteTests.cs @@ -45,7 +45,7 @@ public async Task Valid_unfavoriting_of_article() await _favoriteCollectionProvider.AddFavoriteInDatabase(_user.Username, article.Slug); // act - var response = await WebClient.DeleteAsync($"api/article/{article.Slug}/favorite"); + var response = await WebClient.DeleteAsync($"api/articles/{article.Slug}/unfavorite"); // assert Assert.That(response.StatusCode, Is.EqualTo(HttpStatusCode.OK));