mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-16 08:24:47 +00:00
6bf8fd0b11
Change-Id: I726d7f75e37a759e1b1f6372710cb06f754fc94b
16 lines
512 B
JavaScript
16 lines
512 B
JavaScript
( function ( $, mw ) {
|
|
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( 'button' ).length, 1, 'Thanks button was created.' );
|
|
} );
|
|
|
|
}( jQuery, mediaWiki ) );
|