blob: 0c0e641306efca5ab5856fd0794ad04bc6cdd8f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
( 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.' );
} );
}() );
|