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
Pleroma
pleroma
Commits
4124c9aa
Commit
4124c9aa
authored
Jan 09, 2019
by
kaniini
Browse files
tests: user: add regression test for remote_or_auth_active?/1
parent
595a9704
Pipeline
#6086
passed with stages
in 3 minutes and 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/user_test.exs
View file @
4124c9aa
...
...
@@ -767,4 +767,18 @@ test "finds a user whose name is nil" do
|>
Map
.
put
(
:search_distance
,
nil
)
end
end
test
"remote_or_auth_active?/1 works correctly"
do
Pleroma
.
Config
.
put
([
:instance
,
:account_activation_required
],
true
)
local_user
=
insert
(
:user
,
local:
true
,
info:
%{
confirmation_pending:
true
})
confirmed_user
=
insert
(
:user
,
local:
true
,
info:
%{
confirmation_pending:
false
})
remote_user
=
insert
(
:user
,
local:
false
)
refute
User
.
remote_or_auth_active?
(
local_user
)
assert
User
.
remote_or_auth_active?
(
confirmed_user
)
assert
User
.
remote_or_auth_active?
(
remote_user
)
Pleroma
.
Config
.
put
([
:instance
,
:account_activation_required
],
false
)
end
end
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