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
chore(mentions): add integration test for reply approval notification #3748
base: 2.x
Are you sure you want to change the base?
Conversation
] | ||
]) | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be another assert after here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an $this->assertEquals(1, $mainUser->getUnreadNotificationCount());
is what will confirm this works.
['id' => 33, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 1, 'first_post_id' => 33, 'comment_count' => 6, 'last_post_number' => 6, 'last_post_id' => 38], | ||
], | ||
'posts' => [ | ||
['id' => 1, 'discussion_id' => 1, 'created_at' => Carbon::createFromDate(1975, 5, 21)->toDateTimeString(), 'user_id' => 1, 'type' => 'comment', 'content' => '<t><p>foo bar</p></t>', 'number' => 1], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this much loading data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can delete the 33
discussion and posts from 33
+
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
Not sure why I assumed this was completed, looking again it isn't. @OrdinaryJellyfish could you look into this please
'json' => [ | ||
'data' => [ | ||
'attributes' => [ | ||
'content' => 'reply with predetermined content for automated testing - too-obscure', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To test the reply notification works let's add a post mention (post mention = replying to a post)
we should try to mention a post created by mainUser
(userId = 2) so let's do @"mainUser"#p2
and change the user_id
of post id 2
to 2
$json = json_decode($response->getBody()->getContents(), true); | ||
|
||
$this->send( | ||
$this->request('PATCH', '/api/posts'.$json['data']['id'], [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->request('PATCH', '/api/posts'.$json['data']['id'], [ | |
$this->request('PATCH', '/api/posts/'.$json['data']['id'], [ |
Changes proposed in this pull request:
Reviewers should focus on:
Screenshot
Necessity
Confirmed
composer test
).Required changes: