mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-17 00:40:33 +00:00
703642e40e
Also only load 'ext.thanks.mobilediff' module if the recipient is not an IP. Bug: T118686 Change-Id: I096d3b05a46590db426ae038f17f6e180fa5bf37
15 lines
449 B
JavaScript
15 lines
449 B
JavaScript
( function ( $ ) {
|
|
QUnit.module( 'Thanks mobilediff' );
|
|
|
|
QUnit.test( 'render button for logged in users', 1, function ( assert ) {
|
|
var $container = $( '<div>' ),
|
|
$user = $( '<div>' ).data( 'user-name', 'jon' )
|
|
.data( 'revision-id', 1 )
|
|
.data( 'user-gender', 'male' );
|
|
|
|
mw.thanks._mobileDiffInit( $user, $container );
|
|
assert.strictEqual( $container.find( 'button' ).length, 1, 'Thanks button was created.' );
|
|
} );
|
|
|
|
}( jQuery ) );
|