@@ -36,9 +36,9 @@ defmodule GroupherServer.Test.CMS.ArticleCommentEmotions do
3636
3737 first_comment = List . first ( all_comment )
3838
39- { :ok , _ } = CMS . make_emotion ( first_comment . id , :downvote , user )
40- { :ok , _ } = CMS . make_emotion ( first_comment . id , :beer , user )
41- { :ok , _ } = CMS . make_emotion ( first_comment . id , :popcorn , user )
39+ { :ok , _ } = CMS . emotion_to_comment ( first_comment . id , :downvote , user )
40+ { :ok , _ } = CMS . emotion_to_comment ( first_comment . id , :beer , user )
41+ { :ok , _ } = CMS . emotion_to_comment ( first_comment . id , :popcorn , user )
4242
4343 { :ok , paged_comments } =
4444 CMS . list_article_comments (
@@ -82,8 +82,8 @@ defmodule GroupherServer.Test.CMS.ArticleCommentEmotions do
8282 parent_content = "parent comment"
8383 { :ok , parent_comment } = CMS . create_article_comment ( :post , post . id , parent_content , user )
8484
85- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :downvote , user )
86- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :downvote , user2 )
85+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :downvote , user )
86+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :downvote , user2 )
8787
8888 { :ok , % { emotions: emotions } } = ORM . find ( ArticleComment , parent_comment . id )
8989
@@ -97,8 +97,8 @@ defmodule GroupherServer.Test.CMS.ArticleCommentEmotions do
9797 parent_content = "parent comment"
9898 { :ok , parent_comment } = CMS . create_article_comment ( :post , post . id , parent_content , user )
9999
100- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :downvote , user )
101- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :downvote , user )
100+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :downvote , user )
101+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :downvote , user )
102102
103103 { :ok , parent_comment } = ORM . find ( ArticleComment , parent_comment . id )
104104
@@ -110,9 +110,9 @@ defmodule GroupherServer.Test.CMS.ArticleCommentEmotions do
110110 test "different user can make same emotions on same comment" , ~m( post user user2 user3) a do
111111 { :ok , parent_comment } = CMS . create_article_comment ( :post , post . id , "parent comment" , user )
112112
113- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :beer , user )
114- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :beer , user2 )
115- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :beer , user3 )
113+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :beer , user )
114+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :beer , user2 )
115+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :beer , user3 )
116116
117117 { :ok , % { emotions: emotions } } = ORM . find ( ArticleComment , parent_comment . id )
118118 # IO.inspect(emotions, label: "the parent_comment")
@@ -128,11 +128,11 @@ defmodule GroupherServer.Test.CMS.ArticleCommentEmotions do
128128 parent_content = "parent comment"
129129 { :ok , parent_comment } = CMS . create_article_comment ( :post , post . id , parent_content , user )
130130
131- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :downvote , user )
132- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :downvote , user )
133- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :beer , user )
134- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :heart , user )
135- { :ok , _ } = CMS . make_emotion ( parent_comment . id , :orz , user )
131+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :downvote , user )
132+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :downvote , user )
133+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :beer , user )
134+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :heart , user )
135+ { :ok , _ } = CMS . emotion_to_comment ( parent_comment . id , :orz , user )
136136
137137 { :ok , % { emotions: emotions } } = ORM . find ( ArticleComment , parent_comment . id )
138138
0 commit comments