Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/09/2014 07:29:51 PM (13 years ago)
Author:
boonebgorges
Message:

When deleting activity items, delete corresponding notifications

See #5289

Props imath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/testcases/activity/notifications.php

    r7831 r8095  
    207207
    208208        /**
     209         * @group bp_notifications_delete_all_notifications_by_type
     210         * @group bp_activity_at_mention_delete_notification
     211         */
     212        public function test_bp_activity_at_mention_delete_notification() {
     213                $this->create_notifications();
     214
     215                $notifications = BP_Notifications_Notification::get( array(
     216                        'item_id' => $this->a1,
     217                ) );
     218
     219                // Double check it's there
     220                $this->assertEquals( array( $this->a1 ), wp_list_pluck( $notifications, 'item_id' ) );
     221
     222                bp_activity_delete( array(
     223                        'id' => $this->a1,
     224                ) );
     225
     226                $notifications = BP_Notifications_Notification::get( array(
     227                        'item_id' => $this->a1,
     228                ) );
     229
     230                $this->assertEmpty( $notifications );
     231        }
     232
     233        /**
    209234         * Creates two notifications for $u1, one of which is for mentions
    210235         */
Note: See TracChangeset for help on using the changeset viewer.