Skip to content

Commit

Permalink
Issue #749 - feed post edit
Browse files Browse the repository at this point in the history
  • Loading branch information
nbartels committed Jun 30, 2017
1 parent 8e1c7ad commit dac02b2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
Expand Up @@ -92,6 +92,7 @@ enum ChangeValueEnumeration {
FEED_STATUS_UNHIDE(FeedStatusValue.class), //
FEED_POST_ADD(FeedPostValue.class), //
FEED_POST_EDITED(FeedPostValue.class), //
FEED_POST_EDIT(FeedPostValue.class), //
FEED_POST_HIDE(FeedPostValue.class), //
FEED_POST_REMOVE(FeedPostValue.class), //
FEED_POST_UNHIDE(FeedPostValue.class), //
Expand Down
10 changes: 10 additions & 0 deletions source/test/java/com/restfb/types/WebhookTest.java
Expand Up @@ -209,6 +209,16 @@ public void feedPostHide() {
assertEquals("Let's check this", value.getMessage());
}

@Test
public void feedPostEdit() {
FeedPostValue value =
openAndCheckFeedPostBasics("feed-post-edit", FeedPostValue.class, ITEM_POST, ChangeValue.Verb.EDIT);
assertEquals("1234567890321_7293787835232", value.getPostId());
assertEquals("8423678347823", value.getSenderId());
assertEquals("Let's check this", value.getMessage());
assertEquals("753215778164799", value.getRecipientId());
}

@Test
public void feedPostRemove() {
FeedPostValue value =
Expand Down
24 changes: 24 additions & 0 deletions source/test/resources/json/webhooks/feed-post-edit.json
@@ -0,0 +1,24 @@
{
"entry": [
{
"changes": [
{
"field": "feed",
"value": {
"post_id": "1234567890321_7293787835232",
"sender_name": "Joe",
"sender_id": 8423678347823,
"item": "post",
"verb": "edit",
"message": "Let's check this",
"recipient_id":753215778164799,
"created_time":1467890409
}
}
],
"id": "1234567890321",
"time": 1467890409
}
],
"object": "page"
}

0 comments on commit dac02b2

Please sign in to comment.