Fix more order-dependent jasmine specs
This commit is contained in:
parent
56ef83fa8a
commit
4e4d332d6e
2 changed files with 4 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
describe('app.Router', function () {
|
describe('app.Router', function () {
|
||||||
describe('followed_tags', function() {
|
describe('followed_tags', function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
|
loginAs({name: 'alice'});
|
||||||
factory.preloads({tagFollowings: []});
|
factory.preloads({tagFollowings: []});
|
||||||
spec.loadFixture("aspects_index");
|
spec.loadFixture("aspects_index");
|
||||||
});
|
});
|
||||||
|
|
@ -74,6 +75,7 @@ describe('app.Router', function () {
|
||||||
|
|
||||||
describe("aspects", function() {
|
describe("aspects", function() {
|
||||||
it("calls _initializeStreamView", function() {
|
it("calls _initializeStreamView", function() {
|
||||||
|
new app.models.Stream();
|
||||||
spyOn(app.router, "_initializeStreamView");
|
spyOn(app.router, "_initializeStreamView");
|
||||||
app.router.aspects();
|
app.router.aspects();
|
||||||
expect(app.router._initializeStreamView).toHaveBeenCalled();
|
expect(app.router._initializeStreamView).toHaveBeenCalled();
|
||||||
|
|
@ -123,6 +125,7 @@ describe('app.Router', function () {
|
||||||
|
|
||||||
describe("stream", function() {
|
describe("stream", function() {
|
||||||
it("calls _initializeStreamView", function() {
|
it("calls _initializeStreamView", function() {
|
||||||
|
app.publisher = new app.views.Publisher({standalone: true});
|
||||||
spyOn(app.router, "_initializeStreamView");
|
spyOn(app.router, "_initializeStreamView");
|
||||||
app.router.stream();
|
app.router.stream();
|
||||||
expect(app.router._initializeStreamView).toHaveBeenCalled();
|
expect(app.router._initializeStreamView).toHaveBeenCalled();
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
describe("Diaspora.MarkdownEditor", function() {
|
describe("Diaspora.MarkdownEditor", function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
|
Diaspora.I18n.load(spec.defaultLocale, "en");
|
||||||
spec.content().html("<textarea id='fake-textarea'></textarea>");
|
spec.content().html("<textarea id='fake-textarea'></textarea>");
|
||||||
this.$el = $("#fake-textarea");
|
this.$el = $("#fake-textarea");
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue