Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add listeners for comment approval and unapproval actions #6899

Merged
merged 4 commits into from Apr 4, 2017

Conversation

gititon
Copy link
Contributor

@gititon gititon commented Apr 4, 2017

This PR adds sync listeners for the comment_approved_to_unapproved and comment_unapproved_to_approved actions to the Comments Sync Module for the purpose of reporting these events to the Activity Log.

Changes proposed in this Pull Request:

  • adds sync listeners for the comment_approved_to_unapproved and comment_unapproved_to_approved actions to the Comments Sync Module

Testing instructions:

  • run phpunit --filter comment

Proposed changelog entry for your changes:

Updated comment sync module test to check that the 'comment_approved_to_unapproved' action is fired/received when a comment is unapproved, and that it is only fired/received once.
…c module

I'd added listeners to more comment related actions than I needed to in the comments sync module for the purpose of the Activity Log, and am removing them so that we only listen for the events/actions we need to.
@gititon gititon requested review from enejb and ebinnion April 4, 2017 18:49
@@ -47,6 +47,47 @@ public function test_update_comment() {
$this->assertEquals( "foo bar baz", $remote_comment->comment_content );
}

public function test_unapprove_comment() {

$this->assertEquals( 1, $this->server_replica_storage->comment_count( 'approve' ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to use space to group the different tests that are happening here a bit better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Added whitespace and additional comment to make the comment unapprovral class clearer
@lezama lezama added [Package] Sync [Team] Poseidon [Status] Ready to Merge Go ahead, you can push that green button! labels Apr 4, 2017
@lezama lezama self-requested a review April 4, 2017 19:20
@gititon gititon merged commit c54a768 into master Apr 4, 2017
@matticbot matticbot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Apr 4, 2017
@gititon gititon deleted the add/comment_sync_status branch April 5, 2017 15:54
@gititon gititon added [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Status] Ready to Merge Go ahead, you can push that green button! and removed [Package] Sync [Status] Needs Review To request a review from Crew. Label will be renamed soon. [Status] Ready to Merge Go ahead, you can push that green button! [Team] Poseidon labels Apr 5, 2017
@gititon gititon removed the request for review from ebinnion April 5, 2017 18:23
jeherve added a commit that referenced this pull request Apr 24, 2017
eliorivero pushed a commit that referenced this pull request Apr 25, 2017
* Changelog: initial commit for 4.9 release.

* Changelog: add #6929

* Changelog: move old changelogs to changelog.txt

* Readme: restore deleted release post link.

The post is now live.

* Changelog: add #6853

* Changelog: add #6856

* Changelog: add #6857

* Changelog: add #6884

* Changelog: add #6885

* Changelog: add #6892

* Changelog: add #6894

* Changelog: add #6898

* Changelog: add #6899

* Changelog: add #6900

* Changelog: add #6909

* Changelog: add #6927

* Changelog: add #6947

* Chagelog: add #6958

* Changelog: add #6961

* Changelog: add #6963

* Changelog: add #6965

* Changelog: add #6986

* Changelog: add #7000

* Changelog: add #7013

* Changelog: add #7015

* Changelog: add #7019

* Changelog: add #7028

* Changelog: add #6998

* Changelog: add #6999

* Changelog: add #7044

* Changelog: add #6881

* Changelog: add #6922

* Changelog: add #6940

* Changelog: add #6962

* Changelog: add #6942

* Changelog: add #6959

* Changelog: add #7018

* Changelog: add #6948

* Changelog: add #6657

* Changelog: add #7030

* Changelog: add #7048

* Changelog: add #7031

* Changelog: add #6990

* Changelog: add #6957

* Changelog: add #7027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants