소스 검색

[#114] Fixed test.

tags/v0.9.9
Ivan Tashkinov 5 년 전
부모
커밋
851db74f1c
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. +8
    -1
      test/web/oauth/oauth_controller_test.exs

+ 8
- 1
test/web/oauth/oauth_controller_test.exs 파일 보기

@@ -113,7 +113,14 @@ defmodule Pleroma.Web.OAuth.OAuthControllerTest do
refute Map.has_key?(resp, "access_token")
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"
user = insert(:user, password_hash: Comeonin.Pbkdf2.hashpwsalt(password))
info_change = Pleroma.User.Info.confirmation_changeset(user.info, :unconfirmed)


불러오는 중...
취소
저장