Skip to content

Commit 5254e47

Browse files
committed
Cover http breadcrumb with test
1 parent 2ded096 commit 5254e47

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

sentry/src/test/java/io/sentry/BreadcrumbTest.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ class BreadcrumbTest {
101101

102102
@Test
103103
fun `creates HTTP breadcrumb`() {
104-
val breadcrumb = Breadcrumb.http("http://example.com", "POST")
105-
assertEquals("http://example.com", breadcrumb.data["url"])
104+
val breadcrumb = Breadcrumb.http("http://example.com/api?q=1#top", "POST")
105+
assertEquals("http://example.com/api", breadcrumb.data["url"])
106+
assertEquals("q=1", breadcrumb.data["http.query"])
107+
assertEquals("top", breadcrumb.data["http.fragment"])
106108
assertEquals("POST", breadcrumb.data["method"])
107109
assertEquals("http", breadcrumb.type)
108110
assertEquals("http", breadcrumb.category)

0 commit comments

Comments
 (0)