aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/droppable/droppable_options.js
blob: 2df2dcb15c88ac4a3782cbf6a2d4696d0830d6cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * droppable_optinos.js
 */
(function($) {

module("droppable: options");

test("accept, selector", function() {
	ok(false, 'missing test - untested code is broken code');
});

test("accept, fn", function() {
	ok(false, 'missing test - untested code is broken code');
});

test("activeClass", function() {
	ok(false, 'missing test - untested code is broken code');
});

test("{ addClasses: true }, default", function() {
	equals(droppable_defaults.addClasses, true);

	el = $("<div></div>").droppable({ addClasses: true });
	ok(el.is(".ui-droppable"), "'ui-droppable' class added");
});

test("{ addClasses: false }", function() {
	el = $("<div></div>").droppable({ addClasses: false });
	ok(!el.is(".ui-droppable"), "'ui-droppable' class not added");
});

test("cssNamespace", function() {
	//cssNamespace should be appended with '-droppable' and added as className
	el = $("<div></div>").droppable({ cssNamespace: "ui" });
	equals(el[0].className, "ui-droppable");
	el.droppable("destroy");

	//no className should be added if cssNamepsace is null
	el = $("<div></div>").droppable({ cssNamespace: null });
	equals(el[0].className, "");
	el.droppable("destroy");
});

test("greedy", function() {
	ok(false, 'missing test - untested code is broken code');
});

test("hoverClass", function() {
	ok(false, 'missing test - untested code is broken code');
});

test("scope", function() {
	ok(false, 'missing test - untested code is broken code');
});

test("tolerance, fit", function() {
	ok(false, 'missing test - untested code is broken code');
});

test("tolerance, intersect", function() {
	ok(false, 'missing test - untested code is broken code');
});

test("tolerance, pointer", function() {
	ok(false, 'missing test - untested code is broken code');
});

test("tolerance, touch", function() {
	ok(false, 'missing test - untested code is broken code');
});

})(jQuery);