Skip to content

Commit 644fbaf

Browse files
author
Yegor Bugayenko
committed
#7 reproduced
1 parent 0e107f7 commit 644fbaf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/java/co/stateful/RtLockTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.jcabi.http.mock.MkAnswer;
3434
import com.jcabi.http.mock.MkContainer;
3535
import com.jcabi.http.mock.MkGrizzlyContainer;
36+
import com.jcabi.http.mock.MkQuery;
3637
import com.jcabi.http.request.JdkRequest;
3738
import java.net.HttpURLConnection;
3839
import org.apache.commons.lang3.StringUtils;
@@ -66,7 +67,7 @@ public void locksViaHttp() throws Exception {
6667
.next(new MkAnswer.Simple(RtLockTest.XML))
6768
.next(new MkAnswer.Simple(HttpURLConnection.HTTP_SEE_OTHER, ""))
6869
.start();
69-
final Lock lock = new RtLock("", new JdkRequest(container.home()));
70+
final Lock lock = new RtLock("foo", new JdkRequest(container.home()));
7071
try {
7172
MatcherAssert.assertThat(lock.lock(), Matchers.equalTo(true));
7273
} finally {
@@ -76,9 +77,10 @@ public void locksViaHttp() throws Exception {
7677
container.take().method(),
7778
Matchers.equalTo(Request.GET)
7879
);
80+
final MkQuery query = container.take();
81+
MatcherAssert.assertThat(query.method(), Matchers.is(Request.POST));
7982
MatcherAssert.assertThat(
80-
container.take().method(),
81-
Matchers.equalTo(Request.POST)
83+
query.body(), Matchers.containsString("name=foo")
8284
);
8385
}
8486

0 commit comments

Comments
 (0)