jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/348761 )
Change subject: Echo should notify user about mention on wikitext page
......................................................................
Echo should notify user about mention on wikitext page
Bug: T146916
Change-Id: Id25dbc289fd3fe0fcb92bc4ec85f7851dc72026e
---
M tests/rspec/notification_spec.rb
1 file changed, 16 insertions(+), 0 deletions(-)
Approvals:
Etonkovidova: Looks good to me, approved
Zfilipin: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/tests/rspec/notification_spec.rb b/tests/rspec/notification_spec.rb
index 495d34d..ff4b9a6 100644
--- a/tests/rspec/notification_spec.rb
+++ b/tests/rspec/notification_spec.rb
@@ -36,4 +36,20 @@
expect(welcome_notification['agent']['name']).to eq @random_username
expect(welcome_notification['timestamp']['date']).to eq 'Today'
end
+
+ it 'should notify user about mention on wikitext page' do
+ @client.create_account(@random_username, @random_password)
+
+ page = SecureRandom.hex(5).capitalize
+ @client.edit(title: page, text: "[[User:#{@random_username}]] ~~~~")
+
+ @client.log_in @random_username, @random_password
+ notifications = @client.query(meta:
'notifications').data['notifications']['list']
+
+ mention_notification = notifications.last
+ expect(mention_notification['type']).to eq 'mention'
+ expect(mention_notification['agent']['name']).to eq @admin_username
+ expect(mention_notification['title']['full']).to eq page
+ end
+
end
--
To view, visit https://gerrit.wikimedia.org/r/348761
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id25dbc289fd3fe0fcb92bc4ec85f7851dc72026e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Zfilipin <[email protected]>
Gerrit-Reviewer: Etonkovidova <[email protected]>
Gerrit-Reviewer: Zfilipin <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits