Debian Codegraph @

example/PaginatedViewSpec.js

raw symbols SCIP
1 describe("MyPaginatedView", function() {
2 var context = {};
3
4 beforeEach(function() {
5 context.view = new MyPaginatedView();
6 context.numberOfPages = 10;
7 context.ensureOnPage = function(page) {
8 expect($('.the-number').text()).toEqual(page + 1 + '');
9 }
10
11 $('#content').append(context.view.$el);
12 context.view.render();
13 });
14
15 MyMixinSpecs.PaginateMixinSpec(context);
16 });
17
18
19 describe("MyPaginatedViewAlt", function() {
20 var context = {};
21
22 beforeEach(function() {
23 context.view = new MyPaginatedViewAlt();
24 context.numberOfPages = 10;
25 context.ensureOnPage = function(page) {
26 expect($('.the-number').text()).toEqual(page + 1 + '');
27 }
28
29 $('#content').append(context.view.$el);
30 context.view.render();
31 });
32
33 MyMixinSpecs.PaginateMixinSpec(context);
34 });