equal
deleted
inserted
replaced
1 /* polemicWidget.js */ |
1 /* polemicWidget.js */ |
2 |
2 |
3 function test_polemic_widget() { |
3 function test_polemic_widget() { |
4 module("polemic widget testing", |
4 module("polemic widget testing", |
5 {setup : function() { |
5 {setup : function() { |
6 this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); |
6 this.Popcorn = Popcorn("#popcorn-div"); |
7 |
7 |
8 this.dt = new IriSP.DataLoader(); |
8 this.dt = new IriSP.DataLoader(); |
9 this.ser = new IriSP.MockTweetSerializer(this.dt, "/url"); /* dummy serializer */ |
9 this.ser = new IriSP.MockTweetSerializer(this.dt, "/url"); /* dummy serializer */ |
10 |
10 |
11 IriSP.jQuery("#widget-div").append("<div id='TooltipDiv'></div>"); |
11 IriSP.jQuery("#widget-div").append("<div id='TooltipDiv'></div>"); |
33 }] |
33 }] |
34 } |
34 } |
35 }, |
35 }, |
36 teardown: function() { |
36 teardown: function() { |
37 /* free the popcorn object because it has signal handlers attached to it */ |
37 /* free the popcorn object because it has signal handlers attached to it */ |
38 this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); |
38 this.Popcorn = Popcorn("#popcorn-div"); |
39 }}); |
39 }}); |
40 |
40 |
41 test("test widget initialization", function() { |
41 test("test widget initialization", function() { |
42 |
42 |
43 var tooltip = new IriSP.TooltipWidget(this.Popcorn, this.config.requires[0], this.ser); |
43 var tooltip = new IriSP.TooltipWidget(this.Popcorn, this.config.requires[0], this.ser); |