Skip to content

Commit 679c8c3

Browse files
committed
more test
1 parent 4975d0c commit 679c8c3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/client_test.exs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,9 @@ defmodule Sentry.ClientTest do
164164
test "sends event with sample_rate of 1" do
165165
bypass = Bypass.open
166166
Bypass.expect bypass, fn conn ->
167-
{:ok, _body, conn} = Plug.Conn.read_body(conn)
167+
{:ok, body, conn} = Plug.Conn.read_body(conn)
168+
request_map = Poison.decode!(body)
169+
assert Enum.count(request_map["stacktrace"]["frames"]) > 0
168170
Plug.Conn.resp(conn, 200, ~s<{"id": "340"}>)
169171
end
170172

@@ -177,7 +179,8 @@ defmodule Sentry.ClientTest do
177179
Event.not_a_function
178180
rescue
179181
e ->
180-
{:ok, _} = Sentry.capture_exception(e, result: :sync, sample_rate: 1)
182+
{:ok, _} = Sentry.capture_exception(e, stacktrace: System.stacktrace,
183+
result: :sync, sample_rate: 1)
181184
end
182185
end
183186

0 commit comments

Comments
 (0)