From 838e5ca4327698b3918e6d133f9e994d5c73b8e8 Mon Sep 17 00:00:00 2001 From: cmrd Senya Date: Sat, 16 Jul 2016 11:04:29 +0300 Subject: [PATCH] Use the factory in the publisher_view_spec.js --- .../javascripts/app/views/publisher_view_spec.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/spec/javascripts/app/views/publisher_view_spec.js b/spec/javascripts/app/views/publisher_view_spec.js index 2b8c30c27..fdf92826f 100644 --- a/spec/javascripts/app/views/publisher_view_spec.js +++ b/spec/javascripts/app/views/publisher_view_spec.js @@ -6,8 +6,7 @@ describe("app.views.Publisher", function() { context("standalone", function() { beforeEach(function() { - // TODO should be jasmine helper - loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}}); + loginAs(factory.userAttrs()); spec.loadFixture("aspects_index"); this.view = new app.views.Publisher({ @@ -40,8 +39,7 @@ describe("app.views.Publisher", function() { context("plain publisher", function() { beforeEach(function() { - // TODO should be jasmine helper - loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}}); + loginAs(factory.userAttrs()); spec.loadFixture("aspects_index"); this.view = new app.views.Publisher(); @@ -360,14 +358,9 @@ describe("app.views.Publisher", function() { context("aspect selection", function(){ beforeEach( function(){ - loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}}); + loginAs(factory.userAttrs()); spec.loadFixture("status_message_new"); - this.viewAspectSelector = new app.views.PublisherAspectSelector({ - el: $(".public_toggle .aspect_dropdown"), - form: $(".content_creation form") - }); - this.view = new app.views.Publisher(); this.view.open(); }); @@ -441,8 +434,7 @@ describe("app.views.Publisher", function() { context("locator", function() { beforeEach(function() { - // should be jasmine helper - loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}}); + loginAs(factory.userAttrs()); spec.loadFixture("aspects_index"); this.view = new app.views.Publisher();