mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
fix: all remaining "article" replaced by "post"
All instances of the term "article" were replaced with "post" in variable names, type names, function names, etc. This was primarily to ensure consistent naming and reduce confusion going forward. The term "post" was chosen as it's a more commonly used term for the involved operations in the context of content management and blogging platforms. All tests were also updated to reflect these changes.
This commit is contained in:
+5
-5
@@ -67,12 +67,12 @@ var TestCreatePostTitleTooShort = func(t *testing.T) {
|
||||
|
||||
var TestGetPostSuccess = func(t *testing.T) {
|
||||
var createdPost post.Post
|
||||
var articleToCreate = post.Post{
|
||||
var postToCreate = post.Post{
|
||||
Title: "Test Title",
|
||||
Body: "Test Body",
|
||||
}
|
||||
db := GetDb()
|
||||
db.Create(&articleToCreate).Scan(&createdPost)
|
||||
db.Create(&postToCreate).Scan(&createdPost)
|
||||
|
||||
r, _ := ApiRequest("GET", "/post/"+strconv.Itoa(int(createdPost.ID)), nil)
|
||||
|
||||
@@ -95,12 +95,12 @@ var TestGetPostSuccess = func(t *testing.T) {
|
||||
|
||||
var TestGetAllPostsSuccess = func(t *testing.T) {
|
||||
var createdPost post.Post
|
||||
var articleToCreate = post.Post{
|
||||
var postToCreate = post.Post{
|
||||
Title: "Test Title",
|
||||
Body: "Test Body",
|
||||
}
|
||||
db := GetDb()
|
||||
db.Create(&articleToCreate).Scan(&createdPost)
|
||||
db.Create(&postToCreate).Scan(&createdPost)
|
||||
|
||||
r, _ := ApiRequest("GET", "/post", nil)
|
||||
|
||||
@@ -131,7 +131,7 @@ var TestPostGet = func(t *testing.T) {
|
||||
}
|
||||
|
||||
var TestPostGetAll = func(t *testing.T) {
|
||||
t.Run("Should return all articles", TestGetAllPostsSuccess)
|
||||
t.Run("Should return all posts", TestGetAllPostsSuccess)
|
||||
}
|
||||
|
||||
func TestPost(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user