Skip to content

Commit 300c4f9

Browse files
committed
Add tests
1 parent cc3ee90 commit 300c4f9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/client_test.exs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ defmodule Sentry.ClientTest do
1818
Sentry.Client.parse_dsn!("http://public:[email protected]:9000/1")
1919
end
2020

21+
test "fetches default dsn_env" do
22+
Application.put_env(:sentry, :dsn, @sentry_dsn)
23+
assert @sentry_dsn == Sentry.Client.dsn_env
24+
end
25+
26+
test "fetches system dsn_env" do
27+
System.put_env("SYSTEM_KEY", @sentry_dsn)
28+
Application.put_env(:sentry, :dsn, {:system, "SYSTEM_KEY"})
29+
assert @sentry_dsn == Sentry.Client.dsn_env
30+
end
31+
2132
test "logs api errors" do
2233
bypass = Bypass.open
2334
Bypass.expect bypass, fn conn ->

0 commit comments

Comments
 (0)