projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
templates/layout/app.html.eex: fix link color
[akkoma]
/
test
/
chat_test.exs
diff --git
a/test/chat_test.exs
b/test/chat_test.exs
index 943e481113b8418684decec332a6674f19c8e270..332f2180a1d5e92dc0d837cc1b9f9da8ba7525e2 100644
(file)
--- a/
test/chat_test.exs
+++ b/
test/chat_test.exs
@@
-34,7
+34,6
@@
defmodule Pleroma.ChatTest do
{:ok, chat_two} = Chat.bump_or_create(user.id, other_user.ap_id)
assert chat.id == chat_two.id
{:ok, chat_two} = Chat.bump_or_create(user.id, other_user.ap_id)
assert chat.id == chat_two.id
- assert chat_two.unread == 2
end
test "it returns a chat for a user and recipient if it already exists" do
end
test "it returns a chat for a user and recipient if it already exists" do
@@
-47,15
+46,13
@@
defmodule Pleroma.ChatTest do
assert chat.id == chat_two.id
end
assert chat.id == chat_two.id
end
- test "a returning chat will have an updated `update_at` field
and an incremented unread count
" do
+ test "a returning chat will have an updated `update_at` field" do
user = insert(:user)
other_user = insert(:user)
{:ok, chat} = Chat.bump_or_create(user.id, other_user.ap_id)
user = insert(:user)
other_user = insert(:user)
{:ok, chat} = Chat.bump_or_create(user.id, other_user.ap_id)
- assert chat.unread == 1
:timer.sleep(1500)
{:ok, chat_two} = Chat.bump_or_create(user.id, other_user.ap_id)
:timer.sleep(1500)
{:ok, chat_two} = Chat.bump_or_create(user.id, other_user.ap_id)
- assert chat_two.unread == 2
assert chat.id == chat_two.id
assert chat.updated_at != chat_two.updated_at
assert chat.id == chat_two.id
assert chat.updated_at != chat_two.updated_at