Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commite241820

Browse files
committed
refactor(article-comments): clean up
1 parent4eac5ff commite241820

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎test/groupher_server_web/query/cms/article_comment_test.exs‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,24 +288,23 @@ defmodule GroupherServer.Test.Query.ArticleComment do
288288
assertresults["totalCount"]==total_count+2
289289
end
290290

291-
@tag:wip
291+
@tag:wip2
292292
test"guest user can get paged comment with floor it",~m(guest_conn post user)ado
293-
total_count=10
293+
total_count=5
294294
thread=:post
295295
page_size=10
296296

297297
Enum.reduce(1..total_count,[],fn_,acc->
298298
{:ok,comment}=CMS.create_article_comment(thread,post.id,"test comment",user)
299-
Process.sleep(500)
300-
299+
Process.sleep(1000)
301300
acc++[comment]
302301
end)
303302

304303
variables=%{id:post.id,thread:"POST",filter:%{page:1,size:page_size}}
305304
results=guest_conn|>query_result(@query,variables,"pagedArticleComments")
306305

307306
assertresults["entries"]|>List.first()|>Map.get("floor")==1
308-
assertresults["entries"]|>List.last()|>Map.get("floor")==10
307+
assertresults["entries"]|>List.last()|>Map.get("floor")==5
309308
end
310309

311310
@tag:wip
@@ -522,8 +521,8 @@ defmodule GroupherServer.Test.Query.ArticleComment do
522521
acc++[comment]
523522
end)
524523

525-
{:ok,comment}=CMS.create_article_comment(:post,post.id,"commment",user)
526-
{:ok,comment}=CMS.create_article_comment(:post,post.id,"commment",user)
524+
{:ok,_comment}=CMS.create_article_comment(:post,post.id,"commment",user)
525+
{:ok,_comment}=CMS.create_article_comment(:post,post.id,"commment",user)
527526

528527
variables=%{id:post.id,thread:thread,filter:%{page:1,size:page_size}}
529528

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp