projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
HTTP signatures respect allowlist federation
[akkoma]
/
test
/
pleroma
/
user_relationship_test.exs
diff --git
a/test/pleroma/user_relationship_test.exs
b/test/pleroma/user_relationship_test.exs
index b2b07460748d69dd8f017604721eb1fea71e3899..b3a0dbe37ef8f99be9879d90eda56bba3aa7886a 100644
(file)
--- a/
test/pleroma/user_relationship_test.exs
+++ b/
test/pleroma/user_relationship_test.exs
@@
-5,8
+5,9
@@
defmodule Pleroma.UserRelationshipTest do
alias Pleroma.UserRelationship
defmodule Pleroma.UserRelationshipTest do
alias Pleroma.UserRelationship
- use Pleroma.DataCase, async:
tru
e
+ use Pleroma.DataCase, async:
fals
e
+ import Mock
import Pleroma.Factory
describe "*_exists?/2" do
import Pleroma.Factory
describe "*_exists?/2" do
@@
-79,7
+80,12
@@
defmodule Pleroma.UserRelationshipTest do
end
test "if record already exists, returns it", %{users: [user1, user2]} do
end
test "if record already exists, returns it", %{users: [user1, user2]} do
- user_block = UserRelationship.create_block(user1, user2)
+ user_block =
+ with_mock NaiveDateTime, [:passthrough], utc_now: fn -> ~N[2017-03-17 17:09:58] end do
+ {:ok, %{inserted_at: ~N[2017-03-17 17:09:58]}} =
+ UserRelationship.create_block(user1, user2)
+ end
+
assert user_block == UserRelationship.create_block(user1, user2)
end
end
assert user_block == UserRelationship.create_block(user1, user2)
end
end