Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
normandy
pleroma
Commits
5b1d7c3c
Commit
5b1d7c3c
authored
6 years ago
by
minibikini
Browse files
Options
Downloads
Patches
Plain Diff
fix tests
parent
6f05f448
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/web/federator_test.exs
+6
-8
6 additions, 8 deletions
test/web/federator_test.exs
with
6 additions
and
8 deletions
test/web/federator_test.exs
+
6
−
8
View file @
5b1d7c3c
...
...
@@ -87,11 +87,9 @@ defmodule Pleroma.Web.FederatorTest do
{
:ok
,
_activity
}
=
CommonAPI
.
post
(
user
,
%{
"status"
=>
"HI @nick1@domain.com, @nick2@domain2.com!"
})
assert
called
(
Federator
.
enqueue
(
:publish_single_ap
,
%{
inbox:
inbox1
,
unreachable_since:
dt
})
)
assert
called
(
Federator
.
publish_single_ap
(%{
inbox:
inbox1
,
unreachable_since:
dt
}))
refute
called
(
Federator
.
enqueue
(
:
publish_single_ap
,
%{
inbox:
inbox2
}))
refute
called
(
Federator
.
publish_single_ap
(
%{
inbox:
inbox2
}))
end
test_with_mock
"it federates only to reachable instances via Websub"
,
...
...
@@ -123,13 +121,13 @@ defmodule Pleroma.Web.FederatorTest do
{
:ok
,
_activity
}
=
CommonAPI
.
post
(
user
,
%{
"status"
=>
"HI"
})
assert
called
(
Federator
.
enqueue
(
:
publish_single_websub
,
%{
Federator
.
publish_single_websub
(
%{
callback:
sub2
.
callback
,
unreachable_since:
dt
})
)
refute
called
(
Federator
.
enqueue
(
:
publish_single_websub
,
%{
callback:
sub1
.
callback
}))
refute
called
(
Federator
.
publish_single_websub
(
%{
callback:
sub1
.
callback
}))
end
test_with_mock
"it federates only to reachable instances via Salmon"
,
...
...
@@ -163,13 +161,13 @@ defmodule Pleroma.Web.FederatorTest do
CommonAPI
.
post
(
user
,
%{
"status"
=>
"HI @nick1@domain.com, @nick2@domain2.com!"
})
assert
called
(
Federator
.
enqueue
(
:
publish_single_salmon
,
%{
Federator
.
publish_single_salmon
(
%{
recipient:
remote_user2
,
unreachable_since:
dt
})
)
refute
called
(
Federator
.
enqueue
(
:
publish_single_websub
,
%{
recipient:
remote_user1
}))
refute
called
(
Federator
.
publish_single_websub
(
%{
recipient:
remote_user1
}))
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment