|
74
|
1 |
/* test module for base widgets */ |
|
|
2 |
function test_widget() { |
|
|
3 |
module("Base widget testing", |
|
|
4 |
{setup : function() { |
|
|
5 |
this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); |
|
|
6 |
|
|
|
7 |
this.dt = new IriSP.DataLoader(); |
|
|
8 |
this.ser = new IriSP.JSONSerializer(this.dt, "/url"); |
|
|
9 |
} } |
|
|
10 |
); |
|
|
11 |
|
|
|
12 |
test("test initialisation", function() { |
|
|
13 |
var wid = new IriSP.Widget(this.Popcorn, {parent: "widget-div"}, this.ser); |
|
|
14 |
deepEqual(wid._config, {parent: "widget-div"}, "Check if the parent div is set correctly"); |
|
|
15 |
|
|
|
16 |
}); |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
}; |