|
20 | 20 | throws(block, [expected], [message]) |
21 | 21 | */ |
22 | 22 |
|
23 | | - module('jQuery#awesome', { |
| 23 | + module('jQuery#dragpan', { |
24 | 24 | // This will run before each test in this module. |
25 | 25 | setup: function() { |
26 | | - this.elems = $('#qunit-fixture').children(); |
| 26 | + this.elems = $('#parent').dragpan(); |
27 | 27 | } |
28 | 28 | }); |
29 | 29 |
|
30 | | - test('is chainable', function() { |
| 30 | + test('is a function', function() { |
31 | 31 | expect(1); |
32 | | - // Not a bad test to run on collection methods. |
33 | | - strictEqual(this.elems.awesome(), this.elems, 'should be chainable'); |
| 32 | + strictEqual(typeof $.fn.dragpan, 'function', 'dragpan should be a function'); |
34 | 33 | }); |
35 | 34 |
|
36 | | - test('is awesome', function() { |
| 35 | + test('applies cursor', function() { |
37 | 36 | expect(1); |
38 | | - strictEqual(this.elems.awesome().text(), 'awesome0awesome1awesome2', 'should be awesome'); |
39 | | - }); |
40 | | - |
41 | | - module('jQuery.awesome'); |
42 | | - |
43 | | - test('is awesome', function() { |
44 | | - expect(2); |
45 | | - strictEqual($.awesome(), 'awesome.', 'should be awesome'); |
46 | | - strictEqual($.awesome({punctuation: '!'}), 'awesome!', 'should be thoroughly awesome'); |
47 | | - }); |
48 | | - |
49 | | - module(':awesome selector', { |
50 | | - // This will run before each test in this module. |
51 | | - setup: function() { |
52 | | - this.elems = $('#qunit-fixture').children(); |
53 | | - } |
54 | | - }); |
55 | | - |
56 | | - test('is awesome', function() { |
57 | | - expect(1); |
58 | | - // Use deepEqual & .get() when comparing jQuery objects. |
59 | | - deepEqual(this.elems.filter(':awesome').get(), this.elems.last().get(), 'knows awesome when it sees it'); |
| 37 | + strictEqual($('#parent').css('cursor'), 'all-scroll', 'the parent should have an all-scroll cursor'); |
60 | 38 | }); |
61 | 39 |
|
62 | 40 | }(jQuery)); |
0 commit comments