@@ -62,8 +62,8 @@ defmodule Mobilizon.Service.Auth.LDAPAuthenticatorTest do
|
||||
wholeSubtree: fn -> :ok end,
|
||||
search: fn _connection, _options ->
|
||||
{:ok,
|
||||
{:eldap_search_result, [{:eldap_entry, '', [{'cn', [to_charlist("MyUser")]}]}], [],
|
||||
[]}}
|
||||
{:eldap_search_result, [{:eldap_entry, ~c"", [{~c"cn", [to_charlist("MyUser")]}]}],
|
||||
[], []}}
|
||||
end,
|
||||
close: fn _connection ->
|
||||
send(self(), :close_connection)
|
||||
@@ -111,8 +111,8 @@ defmodule Mobilizon.Service.Auth.LDAPAuthenticatorTest do
|
||||
wholeSubtree: fn -> :ok end,
|
||||
search: fn _connection, _options ->
|
||||
{:ok,
|
||||
{:eldap_search_result, [{:eldap_entry, '', [{'cn', [to_charlist("MyUser")]}]}], [],
|
||||
[]}}
|
||||
{:eldap_search_result, [{:eldap_entry, ~c"", [{~c"cn", [to_charlist("MyUser")]}]}],
|
||||
[], []}}
|
||||
end,
|
||||
close: fn _connection ->
|
||||
send(self(), :close_connection)
|
||||
@@ -149,7 +149,9 @@ defmodule Mobilizon.Service.Auth.LDAPAuthenticatorTest do
|
||||
with_mocks [
|
||||
{:eldap, [],
|
||||
[
|
||||
open: fn [^host], [{:port, ^port}, {:ssl, false} | _] -> {:error, 'connect failed'} end,
|
||||
open: fn [^host], [{:port, ^port}, {:ssl, false} | _] ->
|
||||
{:error, ~c"connect failed"}
|
||||
end,
|
||||
simple_bind: fn _connection, _dn, password ->
|
||||
case password do
|
||||
^admin_password -> :ok
|
||||
@@ -160,7 +162,8 @@ defmodule Mobilizon.Service.Auth.LDAPAuthenticatorTest do
|
||||
wholeSubtree: fn -> :ok end,
|
||||
search: fn _connection, _options ->
|
||||
{:ok,
|
||||
{:eldap_search_result, [{:eldap_entry, '', [{'cn', [to_charlist("MyUser")]}]}], []}}
|
||||
{:eldap_search_result, [{:eldap_entry, ~c"", [{~c"cn", [to_charlist("MyUser")]}]}],
|
||||
[]}}
|
||||
end,
|
||||
close: fn _connection ->
|
||||
send(self(), :close_connection)
|
||||
|
||||
@@ -154,7 +154,11 @@ defmodule Mobilizon.Service.Notifications.SchedulerTest do
|
||||
%User{id: user_id} = user = insert(:user, locale: "fr")
|
||||
|
||||
settings =
|
||||
insert(:settings, user_id: user_id, notification_each_week: true, timezone: "Europe/Paris")
|
||||
insert(:settings,
|
||||
user_id: user_id,
|
||||
notification_each_week: true,
|
||||
timezone: "Europe/Paris"
|
||||
)
|
||||
|
||||
user = Map.put(user, :settings, settings)
|
||||
actor = insert(:actor, user: user)
|
||||
|
||||
@@ -166,7 +166,11 @@ defmodule Mobilizon.Service.Workers.NotificationTest do
|
||||
%User{id: user_id} = user = insert(:user)
|
||||
|
||||
settings =
|
||||
insert(:settings, user_id: user_id, notification_each_week: true, timezone: "Europe/Paris")
|
||||
insert(:settings,
|
||||
user_id: user_id,
|
||||
notification_each_week: true,
|
||||
timezone: "Europe/Paris"
|
||||
)
|
||||
|
||||
user = Map.put(user, :settings, settings)
|
||||
%Actor{} = actor = insert(:actor, user: user)
|
||||
@@ -186,7 +190,11 @@ defmodule Mobilizon.Service.Workers.NotificationTest do
|
||||
%User{id: user_id} = user = insert(:user)
|
||||
|
||||
settings =
|
||||
insert(:settings, user_id: user_id, notification_each_week: true, timezone: "Europe/Paris")
|
||||
insert(:settings,
|
||||
user_id: user_id,
|
||||
notification_each_week: true,
|
||||
timezone: "Europe/Paris"
|
||||
)
|
||||
|
||||
user = %User{user | settings: settings}
|
||||
%Actor{} = actor = insert(:actor, user: user)
|
||||
@@ -210,7 +218,11 @@ defmodule Mobilizon.Service.Workers.NotificationTest do
|
||||
%User{id: user_id} = user = insert(:user)
|
||||
|
||||
settings =
|
||||
insert(:settings, user_id: user_id, notification_each_week: true, timezone: "Europe/Paris")
|
||||
insert(:settings,
|
||||
user_id: user_id,
|
||||
notification_each_week: true,
|
||||
timezone: "Europe/Paris"
|
||||
)
|
||||
|
||||
user = Map.put(user, :settings, settings)
|
||||
%Actor{} = actor = insert(:actor, user: user)
|
||||
@@ -229,7 +241,11 @@ defmodule Mobilizon.Service.Workers.NotificationTest do
|
||||
%User{id: user_id} = user = insert(:user, email: @email)
|
||||
|
||||
settings =
|
||||
insert(:settings, user_id: user_id, notification_each_week: true, timezone: "Europe/Paris")
|
||||
insert(:settings,
|
||||
user_id: user_id,
|
||||
notification_each_week: true,
|
||||
timezone: "Europe/Paris"
|
||||
)
|
||||
|
||||
user = Map.put(user, :settings, settings)
|
||||
%Actor{} = actor = insert(:actor, user: user)
|
||||
|
||||
Reference in New Issue
Block a user