Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Hakaba Hitoyo
pleroma
Commits
32ae9188
Commit
32ae9188
authored
Mar 22, 2018
by
lain
Browse files
Clear caches on test.
parent
f9ab38a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
test/support/conn_case.ex
View file @
32ae9188
...
...
@@ -28,6 +28,7 @@ defmodule Pleroma.Web.ConnCase do
setup
tags
do
Cachex
.
clear
(
:user_cache
)
:ok
=
Ecto
.
Adapters
.
SQL
.
Sandbox
.
checkout
(
Pleroma
.
Repo
)
unless
tags
[
:async
]
do
Ecto
.
Adapters
.
SQL
.
Sandbox
.
mode
(
Pleroma
.
Repo
,
{
:shared
,
self
()})
...
...
test/support/data_case.ex
View file @
32ae9188
...
...
@@ -26,6 +26,7 @@ defmodule Pleroma.DataCase do
end
setup
tags
do
Cachex
.
clear
(
:user_cache
)
:ok
=
Ecto
.
Adapters
.
SQL
.
Sandbox
.
checkout
(
Pleroma
.
Repo
)
unless
tags
[
:async
]
do
...
...
test/web/mastodon_api/status_view_test.exs
View file @
32ae9188
...
...
@@ -58,10 +58,7 @@ test "contains mentions" do
incoming
=
File
.
read!
(
"test/fixtures/incoming_reply_mastodon.xml"
)
# a user with this ap id might be in the cache.
recipient
=
"https://pleroma.soykaf.com/users/lain"
user
=
User
.
get_cached_by_ap_id
(
recipient
)
||
insert
(
:user
,
%{
ap_id:
recipient
})
# invalidate the cache
User
.
invalidate_cache
(
user
)
user
=
insert
(
:user
,
%{
ap_id:
recipient
})
{
:ok
,
[
activity
]}
=
OStatus
.
handle_incoming
(
incoming
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment