Permalink
Browse files

added test for /sync flag

  • Loading branch information...
1 parent 676a865 commit 521c5b932fc7af3620125049305daa36e2725085 @anight anight committed Mar 10, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 tests/request.cpp
View
@@ -34,6 +34,16 @@ BOOST_FIXTURE_TEST_CASE( test_set, fixtures::basic_request )
BOOST_REQUIRE_EQUAL(request_.num_bytes, 31337);
}
+// test that we get the sync flag for a set correctly
+BOOST_FIXTURE_TEST_CASE( test_set_sync, fixtures::basic_request )
+{
+ BOOST_REQUIRE(parser_.parse(request_, string("set foo+meow/sync 0 0 31337\r\n")));
+ BOOST_REQUIRE_EQUAL(request_.type, darner::request::RT_SET);
+ BOOST_REQUIRE_EQUAL(request_.queue, "foo+meow");
+ BOOST_REQUIRE_EQUAL(request_.num_bytes, 31337);
+ BOOST_REQUIRE_EQUAL(request_.set_sync, true);
+}
+
// test that we get some options correctly for a get
BOOST_FIXTURE_TEST_CASE( test_get, fixtures::basic_request )
{

0 comments on commit 521c5b9

Please sign in to comment.