diff --git a/WordPressKit.podspec b/WordPressKit.podspec index e19f4fb7..929dcb1e 100644 --- a/WordPressKit.podspec +++ b/WordPressKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressKit" - s.version = "4.2.0-beta.1" + s.version = "4.2.0-beta.2" s.summary = "WordPressKit offers a clean and simple WordPress.com and WordPress.org API." s.description = <<-DESC diff --git a/WordPressKit/PostServiceRemoteXMLRPC.m b/WordPressKit/PostServiceRemoteXMLRPC.m index 01a66d60..0e2bfa49 100644 --- a/WordPressKit/PostServiceRemoteXMLRPC.m +++ b/WordPressKit/PostServiceRemoteXMLRPC.m @@ -143,10 +143,16 @@ - (void)updatePost:(RemotePost *)post [self.api callMethod:@"metaWeblog.editPost" parameters:parameters success:^(id responseObject, NSHTTPURLResponse *httpResponse) { - // TODO: fetch individual post - if (success) { - success(post); - } + [self getPostWithID:post.postID success:^(RemotePost *fetchedPost) { + if (success) { + success(fetchedPost); + } + } failure:^(NSError *error) { + //We failed to fetch the post but the update was successful + if (success) { + success(post); + } + }]; } failure:^(NSError *error, NSHTTPURLResponse *httpResponse) { if (failure) { failure(error); diff --git a/WordPressKitTests/PostServiceRemoteXMLRPCTests.swift b/WordPressKitTests/PostServiceRemoteXMLRPCTests.swift index 6c9a6aa6..4d850e96 100644 --- a/WordPressKitTests/PostServiceRemoteXMLRPCTests.swift +++ b/WordPressKitTests/PostServiceRemoteXMLRPCTests.swift @@ -259,7 +259,7 @@ class PostServiceRemoteXMLRPCTests: RemoteTestCase, XMLRPCTestable { let expect = expectation(description: "Update post success") stubRemoteResponse(XMLRPCTestableConstants.xmlRpcUrl, - filename: updatePostSuccessMockFilename, + files: [updatePostSuccessMockFilename, getPostSuccessMockFilename], contentType: .XML) if let remoteInstance = remote as? PostServiceRemote {