parent
1428369849
commit
0c5443d543
14 changed files with 68 additions and 63 deletions
|
|
@ -34,6 +34,7 @@
|
||||||
* Added link to diasporafoundation.org to invitation email [#5893](https://github.com/diaspora/diaspora/pull/5893)
|
* Added link to diasporafoundation.org to invitation email [#5893](https://github.com/diaspora/diaspora/pull/5893)
|
||||||
* Gracefully handle missing `og:url`s [#5926](https://github.com/diaspora/diaspora/pull/5926)
|
* Gracefully handle missing `og:url`s [#5926](https://github.com/diaspora/diaspora/pull/5926)
|
||||||
* Remove private post content from "also commented" mails [#5931](https://github.com/diaspora/diaspora/pull/5931)
|
* Remove private post content from "also commented" mails [#5931](https://github.com/diaspora/diaspora/pull/5931)
|
||||||
|
* Add a button to follow/unfollow tags to the mobile interface [#5941](https://github.com/diaspora/diaspora/pull/5941)
|
||||||
|
|
||||||
# 0.5.0.1
|
# 0.5.0.1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,13 @@ Handlebars.registerHelper('imageUrl', function(path){
|
||||||
return ImagePaths.get(path);
|
return ImagePaths.get(path);
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('urlTo', function(path_helper, id, data){
|
Handlebars.registerHelper("urlTo", function(pathHelper, id, data){
|
||||||
if( !data ) {
|
if( !data ) {
|
||||||
// only one argument given to helper, mangle parameters
|
// only one argument given to helper, mangle parameters
|
||||||
data = id;
|
data = id;
|
||||||
return Routes[path_helper+'_path'](data.hash);
|
return Routes[pathHelper](data.hash);
|
||||||
}
|
}
|
||||||
return Routes[path_helper+'_path'](id, data.hash);
|
return Routes[pathHelper](id, data.hash);
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('linkToAuthor', function(context, block) {
|
Handlebars.registerHelper('linkToAuthor', function(context, block) {
|
||||||
|
|
@ -89,32 +89,32 @@ Handlebars.registerHelper('localTime', function(timestamp) {
|
||||||
return new Date(timestamp).toLocaleString();
|
return new Date(timestamp).toLocaleString();
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('fmtTags', function(tags) {
|
Handlebars.registerHelper("fmtTags", function(tags) {
|
||||||
var links = _.map(tags, function(tag) {
|
var links = _.map(tags, function(tag) {
|
||||||
return '<a class="tag" href="' + Routes.tag_path(tag) + '">' +
|
return "<a class=\"tag\" href=\"" + Routes.tag(tag) + "\">" +
|
||||||
' #' + tag +
|
" #" + tag +
|
||||||
'</a>';
|
"</a>";
|
||||||
}).join(' ');
|
}).join(" ");
|
||||||
return new Handlebars.SafeString(links);
|
return new Handlebars.SafeString(links);
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('fmtText', function(text) {
|
Handlebars.registerHelper("fmtText", function(text) {
|
||||||
return new Handlebars.SafeString(app.helpers.textFormatter(text));
|
return new Handlebars.SafeString(app.helpers.textFormatter(text));
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('isCurrentPage', function(path_helper, id, options){
|
Handlebars.registerHelper("isCurrentPage", function(pathHelper, id, options){
|
||||||
var currentPage = "/"+Backbone.history.fragment;
|
var currentPage = "/"+Backbone.history.fragment;
|
||||||
if (currentPage === Handlebars.helpers.urlTo(path_helper, id, options.data)) {
|
if (currentPage === Handlebars.helpers.urlTo(pathHelper, id, options.data)) {
|
||||||
return options.fn(this);
|
return options.fn(this);
|
||||||
} else {
|
} else {
|
||||||
return options.inverse(this);
|
return options.inverse(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('isCurrentProfilePage', function(id, diaspora_handle, options){
|
Handlebars.registerHelper("isCurrentProfilePage", function(id, diasporaHandle, options){
|
||||||
var username = diaspora_handle.split("@")[0];
|
var username = diasporaHandle.split("@")[0];
|
||||||
return Handlebars.helpers.isCurrentPage('person', id, options) ||
|
return Handlebars.helpers.isCurrentPage("person", id, options) ||
|
||||||
Handlebars.helpers.isCurrentPage('user_profile', username, options);
|
Handlebars.helpers.isCurrentPage("userProfile", username, options);
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('aspectMembershipIndicator', function(contact,in_aspect) {
|
Handlebars.registerHelper('aspectMembershipIndicator', function(contact,in_aspect) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
app.models.Person = Backbone.Model.extend({
|
app.models.Person = Backbone.Model.extend({
|
||||||
url: function() {
|
url: function() {
|
||||||
return Routes.person_path(this.get('guid'));
|
return Routes.person(this.get("guid"));
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ app.pages.Contacts = Backbone.View.extend({
|
||||||
update: function() {
|
update: function() {
|
||||||
$("#aspect_nav .ui-sortable").removeClass("synced");
|
$("#aspect_nav .ui-sortable").removeClass("synced");
|
||||||
var data = JSON.stringify({ ordered_aspect_ids: $(this).sortable("toArray", { attribute: "data-aspect-id" }) });
|
var data = JSON.stringify({ ordered_aspect_ids: $(this).sortable("toArray", { attribute: "data-aspect-id" }) });
|
||||||
$.ajax(Routes.order_aspects_path(),
|
$.ajax(Routes.orderAspects(),
|
||||||
{ type: "put", dataType: "text", contentType: "application/json", data: data })
|
{ type: "put", dataType: "text", contentType: "application/json", data: data })
|
||||||
.done(function() { $("#aspect_nav .ui-sortable").addClass("synced"); });
|
.done(function() { $("#aspect_nav .ui-sortable").addClass("synced"); });
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -76,11 +76,11 @@ app.pages.Profile = app.views.Base.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
// a collection is set, this means we want to view photos
|
// a collection is set, this means we want to view photos
|
||||||
var route = this.streamCollection ? 'person_photos_path' : 'person_stream_path';
|
var route = this.streamCollection ? "personPhotos" : "personStream";
|
||||||
var view = this.streamViewClass ? this.streamViewClass : app.views.Stream;
|
var view = this.streamViewClass ? this.streamViewClass : app.views.Stream;
|
||||||
|
|
||||||
app.stream = new app.models.Stream(null, {
|
app.stream = new app.models.Stream(null, {
|
||||||
basePath: Routes[route](app.page.model.get('guid')),
|
basePath: Routes[route](app.page.model.get("guid")),
|
||||||
collection: this.streamCollection
|
collection: this.streamCollection
|
||||||
});
|
});
|
||||||
app.stream.fetch();
|
app.stream.fetch();
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ app.views.Help = app.views.StaticContentView.extend({
|
||||||
this.CHAT_SUBS = {
|
this.CHAT_SUBS = {
|
||||||
add_contact_roster_a: {
|
add_contact_roster_a: {
|
||||||
toggle_privilege: this.getChatIcons(),
|
toggle_privilege: this.getChatIcons(),
|
||||||
contacts_page: this.linkHtml(Routes.contacts_path(), Diaspora.I18n.t('chat.contacts_page'))
|
contacts_page: this.linkHtml(Routes.contacts(), Diaspora.I18n.t("chat.contacts_page"))
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ app.views.NotificationDropdown = app.views.Base.extend({
|
||||||
|
|
||||||
getNotifications: function(){
|
getNotifications: function(){
|
||||||
var self = this;
|
var self = this;
|
||||||
$.getJSON(Routes.notifications_path(this.getParams()), function(notifications){
|
$.getJSON(Routes.notifications(this.getParams()), function(notifications){
|
||||||
$.each(notifications, function(){ self.notifications.push(this); });
|
$.each(notifications, function(){ self.notifications.push(this); });
|
||||||
self.hasMoreNotifs = notifications.length >= self.perPage;
|
self.hasMoreNotifs = notifications.length >= self.perPage;
|
||||||
if(self.nextPage){ self.nextPage++; }
|
if(self.nextPage){ self.nextPage++; }
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ app.views.SinglePostModeration = app.views.Feedback.extend({
|
||||||
createParticipation: function (evt) {
|
createParticipation: function (evt) {
|
||||||
if(evt) { evt.preventDefault(); }
|
if(evt) { evt.preventDefault(); }
|
||||||
var self = this;
|
var self = this;
|
||||||
$.post(Routes.post_participation_path(this.model.get("id")), {}, function () {
|
$.post(Routes.postParticipation(this.model.get("id")), {}, function () {
|
||||||
self.model.set({participation: true});
|
self.model.set({participation: true});
|
||||||
self.render();
|
self.render();
|
||||||
});
|
});
|
||||||
|
|
@ -58,7 +58,7 @@ app.views.SinglePostModeration = app.views.Feedback.extend({
|
||||||
destroyParticipation: function (evt) {
|
destroyParticipation: function (evt) {
|
||||||
if(evt) { evt.preventDefault(); }
|
if(evt) { evt.preventDefault(); }
|
||||||
var self = this;
|
var self = this;
|
||||||
$.post(Routes.post_participation_path(this.model.get("id")), { _method: "delete" }, function () {
|
$.post(Routes.postParticipation(this.model.get("id")), { _method: "delete" }, function () {
|
||||||
self.model.set({participation: false});
|
self.model.set({participation: false});
|
||||||
self.render();
|
self.render();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ app.views.StreamPost = app.views.Post.extend({
|
||||||
createParticipation: function (evt) {
|
createParticipation: function (evt) {
|
||||||
if(evt) { evt.preventDefault(); }
|
if(evt) { evt.preventDefault(); }
|
||||||
that = this;
|
that = this;
|
||||||
$.post(Routes.post_participation_path(this.model.get("id")), {}, function () {
|
$.post(Routes.postParticipation(this.model.get("id")), {}, function () {
|
||||||
that.model.set({participation: true});
|
that.model.set({participation: true});
|
||||||
that.render();
|
that.render();
|
||||||
});
|
});
|
||||||
|
|
@ -128,7 +128,7 @@ app.views.StreamPost = app.views.Post.extend({
|
||||||
destroyParticipation: function (evt) {
|
destroyParticipation: function (evt) {
|
||||||
if(evt) { evt.preventDefault(); }
|
if(evt) { evt.preventDefault(); }
|
||||||
that = this;
|
that = this;
|
||||||
$.post(Routes.post_participation_path(this.model.get("id")), { _method: "delete" }, function () {
|
$.post(Routes.postParticipation(this.model.get("id")), { _method: "delete" }, function () {
|
||||||
that.model.set({participation: false});
|
that.model.set({participation: false});
|
||||||
that.render();
|
that.render();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -27,14 +27,14 @@ $(document).ready(function(){
|
||||||
|
|
||||||
if(selected.hasClass('selected')) {
|
if(selected.hasClass('selected')) {
|
||||||
// remove from aspect
|
// remove from aspect
|
||||||
var membership_id = selected.data('membership_id');
|
var membershipId = selected.data("membership_id");
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: Routes.aspect_membership_path(membership_id),
|
url: Routes.aspectMembership(membershipId),
|
||||||
type: 'DELETE',
|
type: "DELETE",
|
||||||
dataType: 'json',
|
dataType: "json",
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': "application/json, text/javascript, */*; q=0.01"
|
"Accept": "application/json, text/javascript, */*; q=0.01"
|
||||||
}
|
}
|
||||||
}).done(function() {
|
}).done(function() {
|
||||||
selected.text("– " + Diaspora.I18n.t('aspect_dropdown.mobile_row_unchecked', {name: selected.data('name')}));
|
selected.text("– " + Diaspora.I18n.t('aspect_dropdown.mobile_row_unchecked', {name: selected.data('name')}));
|
||||||
|
|
@ -50,7 +50,7 @@ $(document).ready(function(){
|
||||||
var person_id = $el.data('person-id');
|
var person_id = $el.data('person-id');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: Routes.aspect_memberships_path(),
|
url: Routes.aspectMemberships(),
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
"person_id": person_id,
|
"person_id": person_id,
|
||||||
"aspect_id": parseInt(selected.val(), 10)
|
"aspect_id": parseInt(selected.val(), 10)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
if(button.hasClass("btn-success")){
|
if(button.hasClass("btn-success")){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: Routes.tag_followings_path(),
|
url: Routes.tagFollowings(),
|
||||||
data: JSON.stringify({"name": tagName}),
|
data: JSON.stringify({"name": tagName}),
|
||||||
type: "POST",
|
type: "POST",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
|
|
@ -26,7 +26,7 @@ $(document).ready(function(){
|
||||||
var tagFollowing = _.findWhere(gon.preloads.tagFollowings,{name: tagName});
|
var tagFollowing = _.findWhere(gon.preloads.tagFollowings,{name: tagName});
|
||||||
if(!tagFollowing) { return; }
|
if(!tagFollowing) { return; }
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: Routes.tag_following_path(tagFollowing.id),
|
url: Routes.tagFollowing(tagFollowing.id),
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{{#if is_own_profile}}
|
{{#if is_own_profile}}
|
||||||
{{!-- can't block myself, so don't check it here --}}
|
{{!-- can't block myself, so don't check it here --}}
|
||||||
<a href="{{urlTo 'edit_profile'}}" id="edit_profile" class="btn btn-primary creation">{{t 'people.edit_my_profile'}}</a>
|
<a href="{{urlTo 'editProfile'}}" id="edit_profile" class="btn btn-primary creation">{{t 'people.edit_my_profile'}}</a>
|
||||||
{{else}} {{#if is_blocked}}
|
{{else}} {{#if is_blocked}}
|
||||||
<a href="#" id="unblock_user_button" class="btn btn-danger">{{t 'people.stop_ignoring'}}</a>
|
<a href="#" id="unblock_user_button" class="btn btn-danger">{{t 'people.stop_ignoring'}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<i>{{t 'profile.you_have_no_tags'}}</i>
|
<i>{{t 'profile.you_have_no_tags'}}</i>
|
||||||
<span class="add_tags">
|
<span class="add_tags">
|
||||||
<a href="{{urlTo 'edit_profile'}}">{{t 'profile.add_some'}}</a>
|
<a href="{{urlTo 'editProfile'}}">{{t 'profile.add_some'}}</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -74,8 +74,8 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{#if show_photos}}
|
{{#if show_photos}}
|
||||||
<li {{#isCurrentPage 'person_photos' guid}} class="active" {{/isCurrentPage}}>
|
<li {{#isCurrentPage 'personPhotos' guid}} class="active" {{/isCurrentPage}}>
|
||||||
<a href="{{urlTo 'person_photos' guid}}" id="photos_link">
|
<a href="{{urlTo 'personPhotos' guid}}" id="photos_link">
|
||||||
<i class="entypo picture"></i>
|
<i class="entypo picture"></i>
|
||||||
{{t 'profile.photos'}}
|
{{t 'profile.photos'}}
|
||||||
<div class="badge badge-default">{{photos.count}}</div>
|
<div class="badge badge-default">{{photos.count}}</div>
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if show_contacts}}
|
{{#if show_contacts}}
|
||||||
<li {{#isCurrentPage 'person_contacts' guid}} class="active" {{/isCurrentPage}}>
|
<li {{#isCurrentPage 'personContacts' guid}} class="active" {{/isCurrentPage}}>
|
||||||
{{#if is_own_profile}}
|
{{#if is_own_profile}}
|
||||||
<a href="{{urlTo 'contacts'}}" id="contacts_link">
|
<a href="{{urlTo 'contacts'}}" id="contacts_link">
|
||||||
<i class="entypo users"></i>
|
<i class="entypo users"></i>
|
||||||
|
|
@ -91,7 +91,7 @@
|
||||||
<div class="badge badge-default">{{contacts.count}}</div>
|
<div class="badge badge-default">{{contacts.count}}</div>
|
||||||
</a>
|
</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href="{{urlTo 'person_contacts' guid}}" id="contacts_link">
|
<a href="{{urlTo 'personContacts' guid}}" id="contacts_link">
|
||||||
<i class="entypo users"></i>
|
<i class="entypo users"></i>
|
||||||
{{t 'profile.contacts'}}
|
{{t 'profile.contacts'}}
|
||||||
<div class="badge badge-default">{{contacts.count}}</div>
|
<div class="badge badge-default">{{contacts.count}}</div>
|
||||||
|
|
|
||||||
4
config/initializers/jsroutes.rb
Normal file
4
config/initializers/jsroutes.rb
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
JsRoutes.setup do |config|
|
||||||
|
config.camel_case = true
|
||||||
|
config.compact = true
|
||||||
|
end
|
||||||
|
|
@ -1,69 +1,69 @@
|
||||||
|
|
||||||
describe("app.models.Person", function() {
|
describe("app.models.Person", function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
this.mutual_contact = factory.person({relationship: 'mutual'});
|
this.mutualContact = factory.person({relationship: "mutual"});
|
||||||
this.sharing_contact = factory.person({relationship :'sharing'});
|
this.sharingContact = factory.person({relationship: "sharing"});
|
||||||
this.receiving_contact = factory.person({relationship: 'receiving'});
|
this.receivingContact = factory.person({relationship: "receiving"});
|
||||||
this.blocked_contact = factory.person({relationship: 'blocked', block: {id: 1}});
|
this.blockedContact = factory.person({relationship: "blocked", block: {id: 1}});
|
||||||
});
|
});
|
||||||
|
|
||||||
context("#isSharing", function() {
|
context("#isSharing", function() {
|
||||||
it("indicates if the person is sharing", function() {
|
it("indicates if the person is sharing", function() {
|
||||||
expect(this.mutual_contact.isSharing()).toBeTruthy();
|
expect(this.mutualContact.isSharing()).toBeTruthy();
|
||||||
expect(this.sharing_contact.isSharing()).toBeTruthy();
|
expect(this.sharingContact.isSharing()).toBeTruthy();
|
||||||
|
|
||||||
expect(this.receiving_contact.isSharing()).toBeFalsy();
|
expect(this.receivingContact.isSharing()).toBeFalsy();
|
||||||
expect(this.blocked_contact.isSharing()).toBeFalsy();
|
expect(this.blockedContact.isSharing()).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
context("#isReceiving", function() {
|
context("#isReceiving", function() {
|
||||||
it("indicates if the person is receiving", function() {
|
it("indicates if the person is receiving", function() {
|
||||||
expect(this.mutual_contact.isReceiving()).toBeTruthy();
|
expect(this.mutualContact.isReceiving()).toBeTruthy();
|
||||||
expect(this.receiving_contact.isReceiving()).toBeTruthy();
|
expect(this.receivingContact.isReceiving()).toBeTruthy();
|
||||||
|
|
||||||
expect(this.sharing_contact.isReceiving()).toBeFalsy();
|
expect(this.sharingContact.isReceiving()).toBeFalsy();
|
||||||
expect(this.blocked_contact.isReceiving()).toBeFalsy();
|
expect(this.blockedContact.isReceiving()).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
context("#isMutual", function() {
|
context("#isMutual", function() {
|
||||||
it("indicates if we share mutually with the person", function() {
|
it("indicates if we share mutually with the person", function() {
|
||||||
expect(this.mutual_contact.isMutual()).toBeTruthy();
|
expect(this.mutualContact.isMutual()).toBeTruthy();
|
||||||
|
|
||||||
expect(this.receiving_contact.isMutual()).toBeFalsy();
|
expect(this.receivingContact.isMutual()).toBeFalsy();
|
||||||
expect(this.sharing_contact.isMutual()).toBeFalsy();
|
expect(this.sharingContact.isMutual()).toBeFalsy();
|
||||||
expect(this.blocked_contact.isMutual()).toBeFalsy();
|
expect(this.blockedContact.isMutual()).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
context("#isBlocked", function() {
|
context("#isBlocked", function() {
|
||||||
it("indicates whether we blocked the person", function() {
|
it("indicates whether we blocked the person", function() {
|
||||||
expect(this.blocked_contact.isBlocked()).toBeTruthy();
|
expect(this.blockedContact.isBlocked()).toBeTruthy();
|
||||||
|
|
||||||
expect(this.mutual_contact.isBlocked()).toBeFalsy();
|
expect(this.mutualContact.isBlocked()).toBeFalsy();
|
||||||
expect(this.receiving_contact.isBlocked()).toBeFalsy();
|
expect(this.receivingContact.isBlocked()).toBeFalsy();
|
||||||
expect(this.sharing_contact.isBlocked()).toBeFalsy();
|
expect(this.sharingContact.isBlocked()).toBeFalsy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
context("#block", function() {
|
context("#block", function() {
|
||||||
it("POSTs a block to the server", function() {
|
it("POSTs a block to the server", function() {
|
||||||
this.sharing_contact.block();
|
this.sharingContact.block();
|
||||||
var request = jasmine.Ajax.requests.mostRecent();
|
var request = jasmine.Ajax.requests.mostRecent();
|
||||||
|
|
||||||
expect(request.method).toEqual("POST");
|
expect(request.method).toEqual("POST");
|
||||||
expect($.parseJSON(request.params).block.person_id).toEqual(this.sharing_contact.id);
|
expect($.parseJSON(request.params).block.person_id).toEqual(this.sharingContact.id);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
context("#unblock", function() {
|
context("#unblock", function() {
|
||||||
it("DELETEs a block from the server", function(){
|
it("DELETEs a block from the server", function(){
|
||||||
this.blocked_contact.unblock();
|
this.blockedContact.unblock();
|
||||||
var request = jasmine.Ajax.requests.mostRecent();
|
var request = jasmine.Ajax.requests.mostRecent();
|
||||||
|
|
||||||
expect(request.method).toEqual("DELETE");
|
expect(request.method).toEqual("DELETE");
|
||||||
expect(request.url).toEqual(Routes.block_path(this.blocked_contact.get('block').id));
|
expect(request.url).toEqual(Routes.block(this.blockedContact.get("block").id));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue