forked from AkkomaGang/akkoma
[#114] Fixed test.
This commit is contained in:
parent
7cab7de9ff
commit
851db74f1c
1 changed files with 8 additions and 1 deletions
|
@ -113,7 +113,14 @@ test "rejects token exchange with invalid client credentials" do
|
||||||
refute Map.has_key?(resp, "access_token")
|
refute Map.has_key?(resp, "access_token")
|
||||||
end
|
end
|
||||||
|
|
||||||
test "rejects token exchange for valid credentials belonging to unconfirmed user" do
|
test "rejects token exchange for valid credentials belonging to unconfirmed user and confirmation is required" do
|
||||||
|
setting = Pleroma.Config.get([:instance, :account_activation_required])
|
||||||
|
|
||||||
|
unless setting do
|
||||||
|
Pleroma.Config.put([:instance, :account_activation_required], true)
|
||||||
|
on_exit(fn -> Pleroma.Config.put([:instance, :account_activation_required], setting) end)
|
||||||
|
end
|
||||||
|
|
||||||
password = "testpassword"
|
password = "testpassword"
|
||||||
user = insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt(password))
|
user = insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt(password))
|
||||||
info_change = Pleroma.User.Info.confirmation_changeset(user.info, :unconfirmed)
|
info_change = Pleroma.User.Info.confirmation_changeset(user.info, :unconfirmed)
|
||||||
|
|
Loading…
Reference in a new issue