Use the factory in the publisher_view_spec.js
This commit is contained in:
parent
f0bd1f9f06
commit
838e5ca432
1 changed files with 4 additions and 12 deletions
|
|
@ -6,8 +6,7 @@
|
||||||
describe("app.views.Publisher", function() {
|
describe("app.views.Publisher", function() {
|
||||||
context("standalone", function() {
|
context("standalone", function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
// TODO should be jasmine helper
|
loginAs(factory.userAttrs());
|
||||||
loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}});
|
|
||||||
|
|
||||||
spec.loadFixture("aspects_index");
|
spec.loadFixture("aspects_index");
|
||||||
this.view = new app.views.Publisher({
|
this.view = new app.views.Publisher({
|
||||||
|
|
@ -40,8 +39,7 @@ describe("app.views.Publisher", function() {
|
||||||
|
|
||||||
context("plain publisher", function() {
|
context("plain publisher", function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
// TODO should be jasmine helper
|
loginAs(factory.userAttrs());
|
||||||
loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}});
|
|
||||||
|
|
||||||
spec.loadFixture("aspects_index");
|
spec.loadFixture("aspects_index");
|
||||||
this.view = new app.views.Publisher();
|
this.view = new app.views.Publisher();
|
||||||
|
|
@ -360,14 +358,9 @@ describe("app.views.Publisher", function() {
|
||||||
|
|
||||||
context("aspect selection", function(){
|
context("aspect selection", function(){
|
||||||
beforeEach( function(){
|
beforeEach( function(){
|
||||||
loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}});
|
loginAs(factory.userAttrs());
|
||||||
spec.loadFixture("status_message_new");
|
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 = new app.views.Publisher();
|
||||||
this.view.open();
|
this.view.open();
|
||||||
});
|
});
|
||||||
|
|
@ -441,8 +434,7 @@ describe("app.views.Publisher", function() {
|
||||||
|
|
||||||
context("locator", function() {
|
context("locator", function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
// should be jasmine helper
|
loginAs(factory.userAttrs());
|
||||||
loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}});
|
|
||||||
|
|
||||||
spec.loadFixture("aspects_index");
|
spec.loadFixture("aspects_index");
|
||||||
this.view = new app.views.Publisher();
|
this.view = new app.views.Publisher();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue