summaryrefslogtreecommitdiff
path: root/test/web
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-08-10 20:38:31 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-08-10 20:38:31 +0300
commit33a5fc4a70b6f9b8c2d8c03a412d7eec8d5b3db1 (patch)
treee19b00805c1589647c3a3be9065599be418fe03e /test/web
parent267262491ecf7b413052708062abac69b1d8f643 (diff)
downloadpleroma-33a5fc4a70b6f9b8c2d8c03a412d7eec8d5b3db1.tar.gz
pleroma-33a5fc4a70b6f9b8c2d8c03a412d7eec8d5b3db1.zip
[#1149] Fixed failing tests. Ensured Instance.set_unreachable/2 supports ISO 8601 datetime.
Diffstat (limited to 'test/web')
-rw-r--r--test/web/federator_test.exs3
-rw-r--r--test/web/instances/instance_test.exs3
2 files changed, 4 insertions, 2 deletions
diff --git a/test/web/federator_test.exs b/test/web/federator_test.exs
index d3a28d50e..e0be4342b 100644
--- a/test/web/federator_test.exs
+++ b/test/web/federator_test.exs
@@ -249,7 +249,8 @@ defmodule Pleroma.Web.FederatorTest do
File.read!("test/fixtures/mastodon-post-activity.json")
|> Poison.decode!()
- assert Federator.incoming_ap_doc(params) == :error
+ assert {:ok, job} = Federator.incoming_ap_doc(params)
+ assert :error = ObanHelpers.perform(job)
Pleroma.Config.put([:instance, :rewrite_policy], policies)
Pleroma.Config.put(:mrf_keyword, mrf_keyword_policy)
diff --git a/test/web/instances/instance_test.exs b/test/web/instances/instance_test.exs
index d28730994..a1bdd45d3 100644
--- a/test/web/instances/instance_test.exs
+++ b/test/web/instances/instance_test.exs
@@ -22,7 +22,8 @@ defmodule Pleroma.Instances.InstanceTest do
describe "set_reachable/1" do
test "clears `unreachable_since` of existing matching Instance record having non-nil `unreachable_since`" do
- instance = insert(:instance, unreachable_since: NaiveDateTime.utc_now())
+ unreachable_since = NaiveDateTime.to_iso8601(NaiveDateTime.utc_now())
+ instance = insert(:instance, unreachable_since: unreachable_since)
assert {:ok, instance} = Instance.set_reachable(instance.host)
refute instance.unreachable_since