Skip to content

Commit

Permalink
avoid rewriting struct in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellhenke committed Jan 25, 2017
1 parent 78ffede commit 8c439ab
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions test/event_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,19 @@ defmodule Sentry.EventTest do
end

test "create_event works for message" do
assert Event.create_event(message: "Test message")
|> Map.put(:event_id, nil)
|> Map.put(:server_name, nil)
|> Map.put(:timestamp, nil)
==
%Sentry.Event{
breadcrumbs: [],
culprit: nil,
environment: :test,
event_id: nil,
exception: nil,
extra: %{},
level: "error",
message: "Test message",
platform: "elixir",
release: nil,
request: %{},
server_name: nil,
stacktrace: %{frames: []},
tags: %{},
timestamp: nil,
user: %{}}
user: %{}} = Event.create_event(message: "Test message")
end
end

0 comments on commit 8c439ab

Please sign in to comment.