im in ur test stubbin ur mailers
This commit is contained in:
parent
6620f33ae2
commit
7e4529f2bd
2 changed files with 56 additions and 45 deletions
|
|
@ -81,6 +81,9 @@ describe PublicsController do
|
|||
let!(:req) { user2.send_friend_request_to(user.person, aspect2) }
|
||||
let!(:xml) { user2.salmon(req).xml_for(user.person) }
|
||||
before do
|
||||
deliverable = Object.new
|
||||
deliverable.stub!(:deliver)
|
||||
Notifier.stub!(:new_request).and_return(deliverable)
|
||||
req.delete
|
||||
user2.reload
|
||||
user2.pending_requests.count.should be 1
|
||||
|
|
|
|||
|
|
@ -48,6 +48,13 @@ describe Diaspora::Parser do
|
|||
proc { user.receive xml, user2.person }.should change(StatusMessage, :count).by(-1)
|
||||
end
|
||||
|
||||
context "friending" do
|
||||
before do
|
||||
deliverable = Object.new
|
||||
deliverable.stub!(:deliver)
|
||||
Notifier.stub!(:new_request).and_return(deliverable)
|
||||
end
|
||||
|
||||
it "should create a new person upon getting a person request" do
|
||||
request = Request.instantiate(:to =>"http://www.google.com/", :from => person)
|
||||
|
||||
|
|
@ -73,6 +80,7 @@ describe Diaspora::Parser do
|
|||
url = "http://" + request.callback_url.split("/")[2] + "/"
|
||||
Person.where(:url => url).first.id.should == original_person_id
|
||||
end
|
||||
end
|
||||
|
||||
it "should activate the Person if I initiated a request to that url" do
|
||||
request = user.send_friend_request_to(user3.person, aspect)
|
||||
|
|
|
|||
Loading…
Reference in a new issue