1 require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
3 class Facebooker::MobileTest < Test::Unit::TestCase
5 @session = Facebooker::Session.create('apikey', 'secretkey')
6 @user = Facebooker::User.new(1234, @session)
7 Facebooker.use_curl=false
11 expect_http_posts_with_responses(example_can_send_xml)
12 assert(@session.mobile.can_send(@user))
16 expect_http_posts_with_responses(example_send_xml)
17 assert(@session.mobile.send(@user, "Some sort of message"))
21 def example_can_send_xml
23 <?xml version="1.0" encoding="UTF-8"?>
25 xmlns="http://api.facebook.com/1.0/"
26 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
27 xsi:schemaLocation="http://api.facebook.com/1.0/http://api.facebook.com/1.0/facebook.xsd">
29 </sms_canSend_response>
35 <?xml version="1.0" encoding="UTF-8"?>
37 xmlns="http://api.facebook.com/1.0/"
38 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
39 xsi:schemaLocation="http://api.facebook.com/1.0/http://api.facebook.com/1.0/facebook.xsd">