File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -46,4 +46,29 @@ defmodule Sentry.EventTest do
4646 event = event_generated_by_exception ( % { extra_data: "data" } )
4747 assert event . extra == % { extra_data: "data" }
4848 end
49+
50+ test "create_event works for message" do
51+ assert Event . create_event ( message: "Test message" )
52+ |> Map . put ( :event_id , nil )
53+ |> Map . put ( :server_name , nil )
54+ |> Map . put ( :timestamp , nil )
55+ ==
56+ % Sentry.Event {
57+ breadcrumbs: [ ] ,
58+ culprit: nil ,
59+ environment: :test ,
60+ event_id: nil ,
61+ exception: nil ,
62+ extra: % { } ,
63+ level: "error" ,
64+ message: "Test message" ,
65+ platform: "elixir" ,
66+ release: nil ,
67+ request: % { } ,
68+ server_name: nil ,
69+ stacktrace: % { frames: [ ] } ,
70+ tags: % { } ,
71+ timestamp: nil ,
72+ user: % { } }
73+ end
4974end
You can’t perform that action at this time.
0 commit comments