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

Commit fd59e16

Browse files
committed
refactor(mention): fix test
1 parent 6d20bc5 commit fd59e16

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/helper/utils/map.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule Helper.Utils.Map do
1111
def atom_values_to_upcase(map) when is_map(map) do
1212
map
1313
|> Enum.reduce(%{}, fn {key, val}, acc ->
14-
case val !== true and val !== false and is_atom(val) do
14+
case val !== true and val !== false and not is_nil(val) and is_atom(val) do
1515
true -> Map.put(acc, key, val |> to_string |> String.upcase())
1616
false -> Map.put(acc, key, val)
1717
end

test/groupher_server/cms/hooks/mention_in_post_test.exs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ defmodule GroupherServer.Test.CMS.Hooks.MentionInPost do
2222
end
2323

2424
describe "[mention in post basic]" do
25-
@tag :wip
2625
test "mention multi user in post should work", ~m(user user2 user3 community post_attrs)a do
2726
body =
2827
mock_rich_text(

test/groupher_server/delivery/mention_test.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defmodule GroupherServer.Test.Delivery.Mention do
1515

1616
mention_contents = [
1717
%{
18-
type: "POST",
18+
thread: "POST",
1919
title: post.title,
2020
article_id: post.id,
2121
comment_id: nil,
@@ -43,6 +43,7 @@ defmodule GroupherServer.Test.Delivery.Mention do
4343
assert mention.user.login == user.login
4444
end
4545

46+
@tag :wip
4647
test "mention multiable times on same article, will only have one record",
4748
~m(post user user2 mention_contents)a do
4849
{:ok, :pass} = Delivery.send(:mention, post, mention_contents, user)

0 commit comments

Comments
 (0)