Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
9882fa183d
6 changed files with 26 additions and 5 deletions
|
|
@ -23,7 +23,7 @@ class RequestsController < ApplicationController
|
||||||
else
|
else
|
||||||
current_user.ignore_contact_request params[:id]
|
current_user.ignore_contact_request params[:id]
|
||||||
flash[:notice] = I18n.t 'requests.destroy.ignore'
|
flash[:notice] = I18n.t 'requests.destroy.ignore'
|
||||||
respond_with :location => requests_url
|
head :ok
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
= include_stylesheets :default, :media => 'all'
|
= include_stylesheets :default, :media => 'all'
|
||||||
|
|
||||||
|
|
||||||
= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
|
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.4.js"%3E%3C/script%3E'))
|
!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.4.js"%3E%3C/script%3E'))
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,11 @@ Feature: managing contact requests
|
||||||
When I drag the contact request to the "Family" aspect
|
When I drag the contact request to the "Family" aspect
|
||||||
And I wait for the ajax to finish
|
And I wait for the ajax to finish
|
||||||
Then I should see 1 contact in "Family"
|
Then I should see 1 contact in "Family"
|
||||||
|
|
||||||
|
@javascript @wip
|
||||||
|
Scenario: ignoring a contact request
|
||||||
|
When I am on the aspects manage page
|
||||||
|
Then I should see 1 contact request
|
||||||
|
When I click "X" on the contact request
|
||||||
|
And I wait for the ajax to finish
|
||||||
|
Then I should see 0 contact requests
|
||||||
|
|
@ -140,6 +140,9 @@ var AspectEdit = {
|
||||||
type: "DELETE",
|
type: "DELETE",
|
||||||
url: "/requests/" + request_id,
|
url: "/requests/" + request_id,
|
||||||
success: function () {
|
success: function () {
|
||||||
|
person.fadeOut(400, function() {
|
||||||
|
person.remove();
|
||||||
|
});
|
||||||
AspectEdit.decrementRequestsCounter();
|
AspectEdit.decrementRequestsCounter();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,12 @@ end
|
||||||
|
|
||||||
def package_js
|
def package_js
|
||||||
require 'jammit'
|
require 'jammit'
|
||||||
Jammit.package!
|
|
||||||
|
begin
|
||||||
|
Jammit.package!
|
||||||
|
rescue => e
|
||||||
|
puts "Error minifying assets, but server will continue starting normally. Is Java installed on your system?"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,12 @@ describe RequestsController do
|
||||||
describe 'when ignoring a contact request' do
|
describe 'when ignoring a contact request' do
|
||||||
it "succeeds" do
|
it "succeeds" do
|
||||||
xhr :delete, :destroy, "id" => @friend_request.id.to_s
|
xhr :delete, :destroy, "id" => @friend_request.id.to_s
|
||||||
response.should redirect_to(requests_path)
|
response.should be_success
|
||||||
|
end
|
||||||
|
it "removes the request object" do
|
||||||
|
lambda {
|
||||||
|
xhr :delete, :destroy, "id" => @friend_request.id.to_s
|
||||||
|
}.should change(Request, 'count').by(-1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue