Fix style violations, per automated code review
This commit is contained in:
parent
37d440f91e
commit
692f5fdafb
6 changed files with 14 additions and 14 deletions
|
|
@ -122,11 +122,11 @@ describe("app.models.Post.Interactions", function(){
|
|||
});
|
||||
|
||||
it("adds the reshare to the default, activity and aspects stream", function() {
|
||||
app.stream = new app.models.Stream(_, { basePath: "/aspects/all" });
|
||||
app.stream = new app.models.Stream(_, {basePath: "/aspects/all"});
|
||||
|
||||
spyOn(app.stream, "addNow");
|
||||
var self = this;
|
||||
|
||||
|
||||
["/stream", "/activity", "/aspects"].forEach(function(path) {
|
||||
app.stream.basePath = function() { return path; };
|
||||
self.interactions.reshare();
|
||||
|
|
@ -135,11 +135,11 @@ describe("app.models.Post.Interactions", function(){
|
|||
expect(app.stream.addNow).toHaveBeenCalledWith({id: 1});
|
||||
});
|
||||
|
||||
new app.models.Stream(_, { basePath: "/aspects/all" });
|
||||
app.stream = new app.models.Stream(_, {basePath: "/aspects/all"});
|
||||
});
|
||||
|
||||
it("doesn't add the reshare to any other stream", function() {
|
||||
app.stream = new app.models.Stream(_, { basePath: "/aspects/all" });
|
||||
app.stream = new app.models.Stream(_, {basePath: "/aspects/all"});
|
||||
|
||||
spyOn(app.stream, "addNow");
|
||||
var self = this;
|
||||
|
|
@ -150,7 +150,7 @@ describe("app.models.Post.Interactions", function(){
|
|||
expect(app.stream.addNow).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
new app.models.Stream(_, { basePath: "/aspects/all" });
|
||||
app.stream = new app.models.Stream(_, {basePath: "/aspects/all"});
|
||||
});
|
||||
|
||||
it("sets the participation flag for the post", function() {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
describe('app.Router', function () {
|
||||
beforeEach(function () {
|
||||
beforeEach(function() {
|
||||
delete app.page;
|
||||
new app.Router().stream();
|
||||
});
|
||||
|
||||
describe('followed_tags', function() {
|
||||
beforeEach(function() {
|
||||
loginAs({name: 'alice'});
|
||||
loginAs({name: "alice"});
|
||||
factory.preloads({tagFollowings: []});
|
||||
spec.loadFixture("aspects_index");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
describe("app.views.Comment", function(){
|
||||
beforeEach(function(){
|
||||
beforeEach(function() {
|
||||
this.post = factory.post({author : {diaspora_id : "xxx@xxx.xxx"}});
|
||||
this.comment = factory.comment({parent : this.post.toJSON()});
|
||||
this.view = new app.views.Comment({model : this.comment});
|
||||
});
|
||||
|
||||
describe("render", function(){
|
||||
describe("render", function() {
|
||||
it("has a delete link if the author is the current user", function(){
|
||||
loginAs(this.comment.get("author"));
|
||||
expect(this.view.render().$('.delete').length).toBe(1);
|
||||
|
|
@ -47,8 +47,8 @@ describe("app.views.Comment", function(){
|
|||
});
|
||||
|
||||
describe("canRemove", function(){
|
||||
beforeEach(function(){
|
||||
loginAs({name:'alice'});
|
||||
beforeEach(function() {
|
||||
loginAs({name: "alice"});
|
||||
});
|
||||
|
||||
context("is truthy", function(){
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ describe("app.views.Publisher", function() {
|
|||
describe("createStatusMessage", function(){
|
||||
it("doesn't add the status message to the stream", function() {
|
||||
app.stream = new app.models.Stream();
|
||||
|
||||
|
||||
spyOn(app.stream, "addNow");
|
||||
this.view.createStatusMessage($.Event());
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({ status: 200, responseText: "{\"id\": 1}" });
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
describe("app.views.SinglePostInteractions", function() {
|
||||
beforeEach(function() {
|
||||
loginAs({name: "alice", avatar : {small : "http://avatar.com/photo.jpg"}});
|
||||
loginAs({name: "alice", avatar: {small: "http://avatar.com/photo.jpg"}});
|
||||
this.post = factory.post();
|
||||
this.view = new app.views.SinglePostInteractions({model: this.post});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ describe("app.views.StreamPost", function(){
|
|||
// This puts `app.page` into the proper state.
|
||||
delete app.page;
|
||||
new app.Router().stream();
|
||||
|
||||
|
||||
this.PostViewClass = app.views.StreamPost;
|
||||
|
||||
var posts = $.parseJSON(spec.readFixture("stream_json"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue