Commit 67653cf4 authored by Steffen van Bergerem's avatar Steffen van Bergerem Committed by Jonne Haß

Update backbone.js

closes #6262
parent c8b01cb6
......@@ -83,7 +83,7 @@ gem "entypo-rails", "2.2.3"
# JavaScript
gem "backbone-on-rails", "1.1.2.1"
gem "backbone-on-rails", "1.2.0.0"
gem "handlebars_assets", "0.20.2"
gem "jquery-rails", "4.0.4"
gem "jquery-ui-rails", "5.0.5"
......
......@@ -60,7 +60,7 @@ GEM
autoprefixer-rails (5.2.1)
execjs
json
backbone-on-rails (1.1.2.1)
backbone-on-rails (1.2.0.0)
eco
ejs
jquery-rails
......@@ -752,7 +752,7 @@ DEPENDENCIES
addressable (= 2.3.8)
asset_sync (= 1.1.0)
autoprefixer-rails (= 5.2.1)
backbone-on-rails (= 1.1.2.1)
backbone-on-rails (= 1.2.0.0)
bootstrap-sass (= 2.3.2.2)
capybara (= 2.4.4)
carrierwave (= 0.10.0)
......
......@@ -126,7 +126,7 @@ app.Router = Backbone.Router.extend({
{tagText: decodeURIComponent(name).toLowerCase()}
);
$("#author_info").prepend(followedTagsAction.render().el);
app.tags = new app.views.Tags({tagName: name});
app.tags = new app.views.Tags({hashtagName: name});
}
this._hideInactiveStreamLists();
},
......
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
app.views.Tags = Backbone.View.extend({
initialize: function() {
app.publisher.setText("#"+ this.tagName + " ");
initialize: function(opts) {
app.publisher.setText("#"+ opts.hashtagName + " ");
}
});
// @license-end
......@@ -60,13 +60,19 @@ describe("app.views.Feedback", function(){
});
it("allows for unliking a just-liked post", function(){
var responseText = JSON.stringify({"author": this.userAttrs});
var ajax_success = { status: 201, responseText: responseText };
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.like"));
this.link().click();
jasmine.Ajax.requests.mostRecent().respondWith(ajax_success);
jasmine.Ajax.requests.mostRecent().respondWith({
status: 201,
responseText: JSON.stringify({
id: 42,
guid: 42,
author: this.userAttrs
})
});
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.unlike"));
this.link().click();
jasmine.Ajax.requests.mostRecent().respondWith({status: 204});
expect(this.link().text()).toContain(Diaspora.I18n.t("stream.like"));
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment