Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 8d4c8fd

Browse files
committed
test(article): fix test
1 parent 95f7b87 commit 8d4c8fd

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

lib/groupher_server/cms/delegates/article_curd.ex

+2-9
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ defmodule GroupherServer.CMS.Delegate.ArticleCURD do
2525
@default_emotions Embeds.ArticleEmotion.default_emotions()
2626
@default_article_meta Embeds.ArticleMeta.default_meta()
2727

28-
content = """
29-
{
30-
"time": 2018,
31-
"blocks": [],
32-
"version": "2.22.0"
33-
}
34-
"""
35-
3628
@doc """
3729
read articles for un-logined user
3830
"""
@@ -458,13 +450,14 @@ defmodule GroupherServer.CMS.Delegate.ArticleCURD do
458450

459451
defp result({:ok, %{update_edit_status: result}}), do: {:ok, result}
460452
defp result({:ok, %{update_article: result}}), do: {:ok, result}
453+
defp result({:ok, %{update_article_meta: result}}), do: {:ok, result}
461454
defp result({:ok, %{set_viewer_has_states: result}}), do: result |> done()
462455

463456
defp result({:error, :create_article, _result, _steps}) do
464457
{:error, [message: "create article", code: ecode(:create_fails)]}
465458
end
466459

467-
defp result({:error, :update_article, result, _steps}) do
460+
defp result({:error, :update_article, _result, _steps}) do
468461
{:error, [message: "update article", code: ecode(:update_fails)]}
469462
end
470463

test/groupher_server/cms/articles/post_test.exs

-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ defmodule GroupherServer.Test.CMS.Articles.Post do
172172
assert post.is_question
173173
end
174174

175-
@tag :wip
176175
test "can update post with question", ~m(user community post_attrs)a do
177176
post_attrs = Map.merge(post_attrs, %{is_question: true})
178177
{:ok, post} = CMS.create_article(community, :post, post_attrs, user)

test/groupher_server_web/query/cms/comments/post_comment_test.exs

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ defmodule GroupherServer.Test.Query.Comments.PostComment do
3434
}
3535
}
3636
"""
37+
@tag :wip
3738
test "guest user can get comment participators after comment created",
3839
~m(guest_conn post user user2)a do
3940
total_count = 5

0 commit comments

Comments
 (0)