Skip to content

Commit

Permalink
fix: add test to assert correct content length is set
Browse files Browse the repository at this point in the history
  • Loading branch information
igdianov committed Nov 26, 2022
1 parent d8a38f7 commit 7eec972
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static com.github.paulcwarren.ginkgo4j.Ginkgo4jDSL.Describe;
import static com.github.paulcwarren.ginkgo4j.Ginkgo4jDSL.FIt;
import static com.github.paulcwarren.ginkgo4j.Ginkgo4jDSL.It;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
Expand Down Expand Up @@ -94,6 +95,7 @@ public class StoreRestEndpointsIT {
assertThat(IOUtils.contentEquals(
new ByteArrayInputStream("New multi-part content".getBytes()),
r.getInputStream()), is(true));
assertThat(r.contentLength(), equalTo(Long.valueOf(content.length())));
});
});
Context("given a DELETE request to that path", () -> {
Expand Down Expand Up @@ -159,6 +161,7 @@ public class StoreRestEndpointsIT {
new ByteArrayInputStream(
"New multi-part content".getBytes()),
r.getInputStream()), is(true));
assertThat(r.contentLength(), equalTo(Long.valueOf(content.length())));
});
});
It("should delete the resource", () -> {
Expand Down Expand Up @@ -234,6 +237,7 @@ public class StoreRestEndpointsIT {
new ByteArrayInputStream(
"New multi-part content".getBytes()),
r.getInputStream()), is(true));
assertThat(r.contentLength(), equalTo(Long.valueOf(content.length())));
});
});
It("should delete the resource", () -> {
Expand Down

0 comments on commit 7eec972

Please sign in to comment.