mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-22 11:12:42 +00:00
b6a7933544
Bug: T340262 Change-Id: Id177ce9a11b2f5e82bd1099613fd7a9c4cde6dc5
16 lines
489 B
JavaScript
16 lines
489 B
JavaScript
QUnit.module( 'Thanks mobilediff', function () {
|
|
|
|
QUnit.test( 'render button for logged in users', function ( assert ) {
|
|
var $container = $( '<div>' );
|
|
var $user = $( '<div>' )
|
|
.data( 'user-name', 'jon' )
|
|
.data( 'revision-id', 1 )
|
|
.data( 'user-gender', 'male' );
|
|
|
|
// eslint-disable-next-line no-underscore-dangle
|
|
mw.thanks._mobileDiffInit( $user, $container );
|
|
assert.strictEqual( $container.find( '.cdx-button' ).length, 1, 'Thanks button was created.' );
|
|
} );
|
|
|
|
} );
|