mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-04 19:28:19 +00:00
e453114f55
Bug: T208951 Change-Id: Ie84c06e4a69923a5993b173d490bfa97189c285b
16 lines
493 B
JavaScript
16 lines
493 B
JavaScript
( function () {
|
|
QUnit.module( 'Thanks mobilediff' );
|
|
|
|
QUnit.test( 'render button for logged in users', function ( assert ) {
|
|
var $container = $( '<div>' ),
|
|
$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( '.mw-ui-button' ).length, 1, 'Thanks button was created.' );
|
|
} );
|
|
|
|
}() );
|