spec/mock_facebook_responses.yml in koala-0.8.0 vs spec/mock_facebook_responses.yml in koala-0.9.0

- old
+ new

@@ -12,11 +12,11 @@ # ====== REST API ===== rest_api: # -- Stubbed Responses -- - method/fql.query: + /method/fql.query: query=select first_name from user where uid = 216743: get: no_token: '[{"first_name":"Chris"}]' with_token: '[{"first_name":"Chris"}]' query=select read_stream from permissions where uid = 216743: @@ -51,20 +51,20 @@ root: ids=contextoptional,naitik: get: with_token: '[{}, {}]' no_token: '[{}, {}]' - me: + /me: no_args: get: <<: *token_required with_token: '{"updated_time": 1}' fields=id: get: with_token: '{"id": "216743"}' - me/feed: + /me/feed: message=Hello, world, from the test suite!: post: with_token: '{"id": "MOCK_FEED_ITEM"}' message=Hello, world, from the test suite, testing comments!: post: @@ -77,35 +77,35 @@ with_token: '{"id": "FEED_ITEM_DELETE"}' link=http://www.contextoptional.com/&message=Hello, world, from the test suite again!&name=Context Optional: post: with_token: '{"id": "FEED_ITEM_CONTEXT"}' - koppel: + /koppel: no_args: get: with_token: '{"id": 1, "name": 1, "updated_time": 1}' no_token: '{"id": 1, "name": 1}' - contextoptional: + /contextoptional: no_args: get: with_token: '{"id": 1, "name": 1}' no_token: '{"id": 1, "name": 1}' - contextoptional/likes: + /contextoptional/photos: no_args: get: - with_token: '{"data": [{}]}' - no_token: '{"data": [{}]}' - - lukeshepard/likes: + with_token: '{"data": [{}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}' + no_token: '{"data": [{}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}' + + /lukeshepard/likes: no_args: get: <<: *token_required with_token: '{"data": [{}]}' - chris.baclig/picture: + /chris.baclig/picture: no_args: get: no_token: code: 302 headers: @@ -124,44 +124,57 @@ code: 302 headers: Location: http://facebook.com/large - search: + /search: q=facebook: get: - with_token: '{"data": [{"id": "507731521_100412693339488"}]}' - no_token: '{"data": [{"id": "507731521_100412693339488"}]}' - - '115349521819193_113815981982767': + with_token: '{"data": [{"id": "507731521_100412693339488"}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}' + no_token: '{"data": [{"id": "507731521_100412693339488"}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}' + "limit=25&q=facebook&until=2010-09-23T21:17:33+0000": + get: + with_token: '{"data": [{"id": "507731521_100412693339488"}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}' + no_token: '{"data": [{"id": "507731521_100412693339488"}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}' + + '/115349521819193_113815981982767': no_args: delete: <<: *token_required # -- OAuth responses -- - oauth/access_token: + /oauth/access_token: client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&code=<%= OAUTH_CODE %>&redirect_uri=<%= OAUTH_DATA["callback_url"] %>: get: no_token: access_token=<%= ACCESS_TOKEN %> client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&code=foo&redirect_uri=<%= OAUTH_DATA["callback_url"] %>: get: <<: *oauth_error client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&type=client_cred: post: no_token: access_token=<%= ACCESS_TOKEN %> - oauth/exchange_sessions: + /oauth/exchange_sessions: client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=<%= OAUTH_DATA["session_key"] %>&type=client_cred: post: no_token: '[{"access_token":"<%= ACCESS_TOKEN %>","expires":4315}]' client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=<%= OAUTH_DATA["multiple_session_keys"].join(",") %>&type=client_cred: post: no_token: '[{"access_token":"<%= ACCESS_TOKEN %>","expires":4315}, {"access_token":"<%= ACCESS_TOKEN %>","expires":4315}]' + client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=<%= ["foo"].concat(OAUTH_DATA["multiple_session_keys"]).join(",") %>&type=client_cred: + post: + no_token: '[null, {"access_token":"<%= ACCESS_TOKEN %>","expires":4315}, {"access_token":"<%= ACCESS_TOKEN %>","expires":4315}]' + client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=foo,bar&type=client_cred: + post: + no_token: '[null, null]' + client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=foo&type=client_cred: + post: + no_token: '[null]' # -- Subscription Responses -- - <%= APP_ID %>/subscriptions: + /<%= APP_ID %>/subscriptions: callback_url=<%= SUBSCRIPTION_DATA["subscription_path"] %>&fields=name&object=user&verify_token=<%= SUBSCRIPTION_DATA["verify_token"] %>: post: with_token: code: 200 callback_url=<%= SUBSCRIPTION_DATA["subscription_path"] %>foo&fields=name&object=user&verify_token=<%= SUBSCRIPTION_DATA["verify_token"] %>: @@ -189,40 +202,40 @@ get: with_token: '{"data":[{"callback_url":"http://oauth.twoalex.com/subscriptions", "fields":["name"], "object":"user", "active":true}]}' # -- Mock Item Responses -- - MOCK_FEED_ITEM/likes: + /MOCK_FEED_ITEM/likes: no_args: post: with_token: '{"id": "MOCK_LIKE"}' - MOCK_FEED_ITEM/comments: + /MOCK_FEED_ITEM/comments: message=it's my comment!: post: with_token: '{"id": "MOCK_COMMENT"}' - MOCK_FEED_ITEM: + /MOCK_FEED_ITEM: no_args: <<: *item_deleted - FEED_ITEM_CONTEXT: + /FEED_ITEM_CONTEXT: no_args: <<: *item_deleted get: with_token: '{"link":"http://www.contextoptional.com/", "name": "Context Optional"}' - FEED_ITEM_CATS: + /FEED_ITEM_CATS: no_args: <<: *item_deleted get: with_token: '{"message": "the cats are asleep"}' - FEED_ITEM_DELETE: + /FEED_ITEM_DELETE: no_args: <<: *item_deleted - MOCK_COMMENT: + /MOCK_COMMENT: no_args: <<: *item_deleted get: with_token: "{\"message\": \"it\'s my comment!\"}" \ No newline at end of file