@@ -11,7 +11,7 @@ defmodule GroupherServer.Test.CMS.Comments.PostComment do
1111 @ delete_hint CMS.ArticleComment . delete_hint ( )
1212 @ report_threshold_for_fold ArticleComment . report_threshold_for_fold ( )
1313 @ default_comment_meta Embeds.ArticleCommentMeta . default_meta ( )
14- @ pined_comment_limit ArticleComment . pined_comment_limit ( )
14+ @ pinned_comment_limit ArticleComment . pinned_comment_limit ( )
1515
1616 setup do
1717 { :ok , user } = db_insert ( :user )
@@ -240,10 +240,10 @@ defmodule GroupherServer.Test.CMS.Comments.PostComment do
240240 assert { :error , _ } = ArticlePinnedComment |> ORM . find_by ( % { article_comment_id: comment . id } )
241241 end
242242
243- test "pined comments has a limit for each article" , ~m( user post) a do
243+ test "pinned comments has a limit for each article" , ~m( user post) a do
244244 { :ok , comment } = CMS . create_article_comment ( :post , post . id , "commment" , user )
245245
246- Enum . reduce ( 0 .. ( @ pined_comment_limit - 1 ) , [ ] , fn _ , _acc ->
246+ Enum . reduce ( 0 .. ( @ pinned_comment_limit - 1 ) , [ ] , fn _ , _acc ->
247247 { :ok , _comment } = CMS . pin_article_comment ( comment . id )
248248 end )
249249
@@ -379,7 +379,7 @@ defmodule GroupherServer.Test.CMS.Comments.PostComment do
379379 assert total_count == paged_comments . total_count
380380 end
381381
382- test "paged article comments should contains pined comments at top position" ,
382+ test "paged article comments should contains pinned comments at top position" ,
383383 ~m( user post) a do
384384 total_count = 20
385385 page_number = 1
@@ -411,7 +411,7 @@ defmodule GroupherServer.Test.CMS.Comments.PostComment do
411411 assert paged_comments . total_count == total_count + 2
412412 end
413413
414- test "only page 1 have pined coments" ,
414+ test "only page 1 have pinned coments" ,
415415 ~m( user post) a do
416416 total_count = 20
417417 page_number = 2
@@ -558,7 +558,7 @@ defmodule GroupherServer.Test.CMS.Comments.PostComment do
558558 assert post . article_comments_count == 4
559559 end
560560
561- test "delete comment still delete pined record if needed" , ~m( user post) a do
561+ test "delete comment still delete pinned record if needed" , ~m( user post) a do
562562 total_count = 10
563563
564564 all_comments =
0 commit comments