Skip to content

Commit 5031df2

Browse files
committed
fix tests
1 parent dea690b commit 5031df2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

test/event_test.exs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ defmodule Sentry.EventTest do
3131
%{filename: "timer.erl", function: ":timer.tc/1", lineno: 166, module: :timer, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
3232
%{filename: "lib/ex_unit/runner.ex", function: "anonymous fn/3 in ExUnit.Runner.spawn_test/3", lineno: 250, module: ExUnit.Runner, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
3333
]
34-
Version.match?(System.version, ">= 1.5.0") ->
34+
Version.match?(System.version, "~> 1.5.0") ->
3535
[
3636
%{filename: nil, function: "Sentry.Event.not_a_function/3", lineno: nil, module: Sentry.Event, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{"arg0" => "1", "arg1" => "2", "arg2" => "3"}},
3737
%{filename: "test/event_test.exs", function: "Sentry.EventTest.event_generated_by_exception/1", lineno: 8, module: Sentry.EventTest, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
@@ -40,6 +40,15 @@ defmodule Sentry.EventTest do
4040
%{filename: "timer.erl", function: ":timer.tc/1", lineno: 166, module: :timer, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
4141
%{filename: "lib/ex_unit/runner.ex", function: "anonymous fn/3 in ExUnit.Runner.spawn_test/3", lineno: 240, module: ExUnit.Runner, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
4242
]
43+
Version.match?(System.version, "~> 1.6.0") ->
44+
[
45+
%{filename: nil, function: "Sentry.Event.not_a_function/3", lineno: nil, module: Sentry.Event, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{"arg0" => "1", "arg1" => "2", "arg2" => "3"}},
46+
%{filename: "test/event_test.exs", function: "Sentry.EventTest.event_generated_by_exception/1", lineno: 8, module: Sentry.EventTest, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
47+
%{filename: "test/event_test.exs", function: "Sentry.EventTest.\"test parses error exception\"/1", lineno: 57, module: Sentry.EventTest, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
48+
%{filename: "lib/ex_unit/runner.ex", function: "ExUnit.Runner.exec_test/1", lineno: 306, module: ExUnit.Runner, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
49+
%{filename: "timer.erl", function: ":timer.tc/1", lineno: 166, module: :timer, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
50+
%{filename: "lib/ex_unit/runner.ex", function: "anonymous fn/4 in ExUnit.Runner.spawn_test/3", lineno: 245, module: ExUnit.Runner, context_line: nil, post_context: [], pre_context: [], in_app: false, vars: %{}},
51+
]
4352
end
4453
end
4554

test/logger_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ defmodule Sentry.LoggerTest do
111111
assert List.last(json["stacktrace"]["frames"])["vars"] == %{"arg0" => "{}", "arg1" => "{}", "arg2" => "{}"}
112112
assert List.last(json["stacktrace"]["frames"])["filename"] == "lib/calendar/naive_datetime.ex"
113113
assert List.last(json["stacktrace"]["frames"])["function"] == "NaiveDateTime.from_erl/3"
114-
assert List.last(json["stacktrace"]["frames"])["lineno"] == 522
114+
assert List.last(json["stacktrace"]["frames"])["lineno"] == 625
115115
end
116116

117117
assert %{"in_app" => false,

0 commit comments

Comments
 (0)