apache_conf config_test.exs

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf config_test.exs相关的知识,希望对你有一定的参考价值。

defmodule ExrmDebTest.ConfigTest do
  use ExUnit.Case, async: false
  import ExUnit.CaptureIO

  test "Configuration is sanitized correctly" do
    out = ExrmDeb.Utils.Config.sanitize_config(%{ name: "$!JIM-B+O.B,'" })
    assert Map.fetch!(out, :sanitized_name)
    assert Map.fetch!(out, :sanitized_name) == "jim-b+o.b"
  end

  test "building default config works correctly" do
    assert {:ok, _} = ExrmDeb.Config.build_config
  end

  test "building an invalid config results in an error being raised" do
    capture_io(fn ->
      assert {:error, [{:error, :description, :presence, "must be present"}]} =
             ExrmDeb.Config.build_config(%{description: nil})
    end)
  end

  test "owner must have both user and group" do
    capture_io(fn ->
      assert {:error, [{:error, [:owner, :group], :presence, "must be present"}]} =
             ExrmDeb.Config.build_config(%{owner: [user: "root"]})
    end)
  end

end

以上是关于apache_conf config_test.exs的主要内容,如果未能解决你的问题,请参考以下文章

apache_conf htaccess的

apache_conf 基本认证

apache_conf 配置地图

apache_conf 更改最长执行时间

apache_conf 更改最大上传大小

apache_conf 基本认证