Sha256: 50a5dd5524c2bbeb8c5dfdd0d3beb7ddd8d5f4f3cd8f1b858fcc194632aeb0fa
Contents?: true
Size: 901 Bytes
Versions: 6
Compression:
Stored size: 901 Bytes
Contents
describe("DocView", function(){ beforeEach(function(){ var session = new Session(); session.setAuthenticated('true'); session.setApiKey('testtoken'); doc = new Doc(); doc.set("dbkey",'testkey'); sinon.stub(doc,'get_doc') this.docView = new App.Views.Doc({model : doc}); }); afterEach(function(){ var session = new Session(); session.setAuthenticated('false'); session.setApiKey(null); }); it("should have render initial html",function(){ this.docRenderSpy = sinon.spy(this.docView,'render'); this.docView.render(); expect(this.docRenderSpy).toHaveBeenCalledOnce(); }); it("should have correct html rendered ",function(){ var title = this.docView.el.innerHTML.search('testkey'); expect(title).toBeGreaterThan(0); var change_btn = this.docView.el.innerHTML.search('Upload token string'); expect(change_btn).toBeGreaterThan(0); }) });
Version data entries
6 entries across 6 versions & 1 rubygems