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

Commit 781df06

Browse files
committed
chore(test): clean up warnings
1 parent 866c9d5 commit 781df06

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

test/groupher_server/statistics/statistics_test.exs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,13 @@ defmodule GroupherServer.Test.Statistics do
153153
assert {:error, nil} = Cache.get(scope)
154154

155155
{:ok, contributes} = Statistics.list_contributes_digest(%Community{id: community.id})
156+
{:ok, cached_contributes} = Cache.get(scope)
156157

157-
assert {:ok, contributes} = Cache.get(scope)
158+
assert contributes == cached_contributes
158159
end
159160

160-
test "Rihanna should work in test sandbox", ~m(community)a do
161-
res = Rihanna.enqueue({IO, :puts, ["Work, work, work, work, work."]})
161+
test "Rihanna should work in test sandbox" do
162+
_res = Rihanna.enqueue({IO, :puts, ["Work, work, work, work, work."]})
162163
Process.sleep(1000)
163164
# IO.inspect(res, label: "res")
164165
end

test/groupher_server_web/query/accounts/favorited_videos_test.exs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ defmodule GroupherServer.Test.Query.Accounts.FavritedVideos do
3131
}
3232
}
3333
"""
34+
@tag :wip2
3435
test "login user can get it's own favoritedVideos", ~m(user_conn user videos)a do
3536
Enum.each(videos, fn video ->
3637
{:ok, _} = CMS.reaction(:video, :favorite, video.id, user)
@@ -39,7 +40,9 @@ defmodule GroupherServer.Test.Query.Accounts.FavritedVideos do
3940
random_id = videos |> Enum.shuffle() |> List.first() |> Map.get(:id) |> to_string
4041

4142
variables = %{filter: %{page: 1, size: 20}}
42-
results = user_conn |> query_result(@query, variables, "user")
43+
results = user_conn |> query_result(@query, variables, "user", :debug)
44+
IO.inspect(results, label: "my fuck ")
45+
4346
assert results["favoritedVideos"] |> Map.get("totalCount") == @total_count
4447
assert results["favoritedVideosCount"] == @total_count
4548

test/helper/converter/html_sanitizer_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule GroupherServer.Test.Helper.Converter.HtmlSanitizer do
33

44
use GroupherServerWeb.ConnCase, async: true
55

6-
alias Helper.RichTextParser, as: Parser
6+
# alias Helper.RichTextParser, as: Parser
77
alias Helper.Converter.HtmlSanitizer, as: Sanitizer
88

99
describe "[snaitizer test]" do

test/helper/converter/md_to_editor_test.exs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ defmodule GroupherServer.Test.Helper.Converter.MdToEditor do
190190
this is a paragraph with **`inline-code-string`** in it
191191
"""
192192

193-
res = Converter.parse(markdown)
194-
195-
assert res = [
193+
assert Converter.parse(markdown) == [
196194
%{
197195
data: %{
198196
text:
@@ -206,8 +204,6 @@ defmodule GroupherServer.Test.Helper.Converter.MdToEditor do
206204
this is a paragraph with **_`inline-code-string`_** in it
207205
"""
208206

209-
res = Converter.parse(markdown)
210-
211207
assert Converter.parse(markdown) == [
212208
%{
213209
data: %{

0 commit comments

Comments
 (0)