diff --git a/test/api/model/tweet.cc b/test/api/model/tweet.cc index 4420f5b..de520d0 100644 --- a/test/api/model/tweet.cc +++ b/test/api/model/tweet.cc @@ -34,63 +34,4 @@ BOOST_AUTO_TEST_CASE(test02) { BOOST_TEST(tweet.source() == "Twitter for Android"); } -BOOST_AUTO_TEST_CASE(test03) { - std::string json = R"({ - "errors" : [{ - "code" : 32, - "message" : "Could not authenticate you." - }] - })"; - - BOOST_CHECK_THROW(CocoaTweet::API::Model::Tweet(json), - CocoaTweet::Exception::AuthenticateException); -} - -BOOST_AUTO_TEST_CASE(test04) { - std::string json = R"({ - "errors" : [{ - "code" : 88, - "message" : "Rate limit exceeded." - }] - })"; - - BOOST_CHECK_THROW(CocoaTweet::API::Model::Tweet(json), - CocoaTweet::Exception::RateLimitException); -} - -BOOST_AUTO_TEST_CASE(test05) { - std::string json = R"({ - "errors" : [{ - "code" : 185, - "message" : "User is over daily status update limit." - }] - })"; - - BOOST_CHECK_THROW(CocoaTweet::API::Model::Tweet(json), - CocoaTweet::Exception::RateLimitException); -} - -BOOST_AUTO_TEST_CASE(test06) { - std::string json = R"({ - "errors" : [{ - "code" : 186, - "message" : "Tweet needs to be a bit shorter." - }] - })"; - - BOOST_CHECK_THROW(CocoaTweet::API::Model::Tweet(json), - CocoaTweet::Exception::TweetTooLongException); -} - -BOOST_AUTO_TEST_CASE(test07) { - std::string json = R"({ - "errors" : [{ - "code" : 187, - "message" : "Status is a duplicate." - }] - })"; - - BOOST_CHECK_THROW(CocoaTweet::API::Model::Tweet(json), - CocoaTweet::Exception::TweetDuplicateException); -} BOOST_AUTO_TEST_SUITE_END()