Skip to content

Commit

Permalink
RESTClient does not set Content-Type header if body is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
tsegismont committed Jul 8, 2015
1 parent 8249559 commit 114bdbc
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import org.junit.Test

import static org.junit.Assert.assertEquals

import groovyx.net.http.ContentType

/**
* @author jsanda
*/
Expand Down Expand Up @@ -326,10 +324,10 @@ class MetricsITest extends RESTTest {
String tenantId = nextTenantId()

badPost( path: "metrics/data",
requestContentType: ContentType.JSON,
body: "",
headers: [(tenantHeaderName): tenantId]) { exception ->
// Missing type
assertEquals(415, exception.response.status)
assertEquals(400, exception.response.status)
}
}

Expand Down

0 comments on commit 114bdbc

Please sign in to comment.