Skip to content

Commit

Permalink
Cover http breadcrumb with test
Browse files Browse the repository at this point in the history
  • Loading branch information
adinauer committed Jan 30, 2023
1 parent 2ded096 commit 5254e47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sentry/src/test/java/io/sentry/BreadcrumbTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ class BreadcrumbTest {

@Test
fun `creates HTTP breadcrumb`() {
val breadcrumb = Breadcrumb.http("http://example.com", "POST")
assertEquals("http://example.com", breadcrumb.data["url"])
val breadcrumb = Breadcrumb.http("http://example.com/api?q=1#top", "POST")
assertEquals("http://example.com/api", breadcrumb.data["url"])
assertEquals("q=1", breadcrumb.data["http.query"])
assertEquals("top", breadcrumb.data["http.fragment"])
assertEquals("POST", breadcrumb.data["method"])
assertEquals("http", breadcrumb.type)
assertEquals("http", breadcrumb.category)
Expand Down

0 comments on commit 5254e47

Please sign in to comment.