From d818353f4df083efb61338b5b6d2cb59d1edd817 Mon Sep 17 00:00:00 2001 From: David Mohl Date: Fri, 3 Nov 2023 13:26:05 +0900 Subject: [PATCH] Add test for env propagation --- test/binance_test.exs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/binance_test.exs b/test/binance_test.exs index af68f6a..53f2f40 100644 --- a/test/binance_test.exs +++ b/test/binance_test.exs @@ -67,6 +67,11 @@ defmodule BinanceTest do match_requests_on: [:headers, :request_body] do assert {:error, {:binance_error, %{code: -2014, msg: "API-key format invalid."}}} = Binance.Trade.get_open_orders(api_key: "dummy_api_key", api_secret: "hoge") + + Application.put_env(:binance, :api_key, "dummy_api_key") + + assert {:error, {:binance_error, %{code: -2014, msg: "API-key format invalid."}}} = + Binance.Trade.get_open_orders() end ExVCR.Setting.set(:filter_request_headers, existing_setting)