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

Commit b639ecf

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

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

lib/groupher_server/cms/delegates/article_curd.ex

+2-1
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,9 @@ defmodule GroupherServer.CMS.Delegate.ArticleCURD do
450450

451451
defp result({:ok, %{update_edit_status: result}}), do: {:ok, result}
452452
defp result({:ok, %{update_article: result}}), do: {:ok, result}
453-
defp result({:ok, %{update_article_meta: result}}), do: {:ok, result}
453+
# NOTE: for read article, order is import
454454
defp result({:ok, %{set_viewer_has_states: result}}), do: result |> done()
455+
defp result({:ok, %{update_article_meta: result}}), do: {:ok, result}
455456

456457
defp result({:error, :create_article, _result, _steps}) do
457458
{:error, [message: "create article", code: ecode(:create_fails)]}

test/groupher_server/cms/articles/repo_test.exs

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ defmodule GroupherServer.Test.Articles.Repo do
6363
assert user2.id in created.meta.viewed_user_ids
6464
end
6565

66+
@tag :wip
6667
test "read repo should contains viewer_has_xxx state", ~m(repo_attrs community user user2)a do
6768
{:ok, repo} = CMS.create_article(community, :repo, repo_attrs, user)
6869
{:ok, repo} = CMS.read_article(:repo, repo.id, user)

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

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

0 commit comments

Comments
 (0)