Sha256: ae996f913ae7da13c8ed51b403a518f00de9960af0432f7a7daf544a85da3d95

Contents?: true

Size: 886 Bytes

Versions: 3

Compression:

Stored size: 886 Bytes

Contents

shared_examples_for "Koala RestAPI without an access token" do
  # FQL_QUERY
  describe "when making a FQL request" do
    it "should be able to access public information via FQL" do
      @result = @api.fql_query("select first_name from user where uid = 216743")
      @result.size.should == 1
      @result.first["first_name"].should == "Chris"
    end

    it "should not be able to access protected information via FQL" do
      lambda { @api.fql_query("select read_stream from permissions where uid = 216743") }.should raise_error(Koala::Facebook::APIError)
    end
  end
end

class FacebookRestAPINoAccessTokenTest < Test::Unit::TestCase
  describe "Koala RestAPI without an access token" do
    before :each do
      @api = Koala::Facebook::RestAPI.new
    end

    it_should_behave_like "Koala RestAPI"
    it_should_behave_like "Koala RestAPI without an access token"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
koala-1.0.0.beta2.1 spec/koala/rest_api/rest_api_no_access_token_tests.rb
koala-1.0.0.beta2 spec/koala/rest_api/rest_api_no_access_token_tests.rb
koala-1.0.0.beta spec/koala/rest_api/rest_api_no_access_token_tests.rb