diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-08-01 00:10:38 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2022-08-01 00:12:00 +0300 |
commit | 9485a0263985a5c2a41446e020e02c2accabc2bb (patch) | |
tree | 01bf7a345b4cc80009586c8832ff2a5fdb905a8a /spec/javascripts/app/router_spec.js | |
parent | 02eba842aed40e6411fbed8db9e32fcd0e59c642 (diff) | |
parent | eaedd3d26ca7e993e42fba02bc4e4fc5e72ae73e (diff) |
Merge branch 'next-minor'v0.7.18.0
Diffstat (limited to 'spec/javascripts/app/router_spec.js')
-rw-r--r-- | spec/javascripts/app/router_spec.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/javascripts/app/router_spec.js b/spec/javascripts/app/router_spec.js index 14e6dd2df..f635c42ed 100644 --- a/spec/javascripts/app/router_spec.js +++ b/spec/javascripts/app/router_spec.js @@ -1,8 +1,15 @@ describe('app.Router', function () { + beforeEach(function() { + delete app.page; + new app.Router().stream(); + }); + describe('followed_tags', function() { beforeEach(function() { + loginAs({name: "alice"}); factory.preloads({tagFollowings: []}); spec.loadFixture("aspects_index"); + app.publisher = new app.views.Publisher({standalone: true}); }); it('decodes name before passing it into TagFollowingAction', function () { @@ -74,6 +81,8 @@ describe('app.Router', function () { describe("aspects", function() { it("calls _initializeStreamView", function() { + new app.models.Stream(); + app.publisher = new app.views.Publisher({standalone: true}); spyOn(app.router, "_initializeStreamView"); app.router.aspects(); expect(app.router._initializeStreamView).toHaveBeenCalled(); @@ -123,6 +132,7 @@ describe('app.Router', function () { describe("stream", function() { it("calls _initializeStreamView", function() { + app.publisher = new app.views.Publisher({standalone: true}); spyOn(app.router, "_initializeStreamView"); app.router.stream(); expect(app.router._initializeStreamView).toHaveBeenCalled(); @@ -169,6 +179,7 @@ describe('app.Router', function () { app.publisher = { jasmineTestValue: 42 }; app.router._initializeStreamView(); expect(app.publisher.jasmineTestValue).toEqual(42); + delete app.publisher; // don't leave fake publisher around }); it("doesn't set app.publisher if there is no publisher element in page", function() { |