fix invitations#new, and a post spec which was mongo specific
This commit is contained in:
parent
960058803a
commit
7a02a31440
3 changed files with 3 additions and 4 deletions
|
|
@ -7,8 +7,8 @@ class InvitationsController < Devise::InvitationsController
|
||||||
before_filter :check_token, :only => [:edit]
|
before_filter :check_token, :only => [:edit]
|
||||||
|
|
||||||
def new
|
def new
|
||||||
sent_invitations = current_user.invitations_from_me
|
sent_invitations = current_user.invitations_from_me.includes(:recipient)
|
||||||
@emails_delivered = sent_invitations.map!{ |i| i.to.email }
|
@emails_delivered = sent_invitations.map!{ |i| i.recipient.email }
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,3 @@
|
||||||
= t('.already_invited')
|
= t('.already_invited')
|
||||||
- for email in @emails_delivered
|
- for email in @emails_delivered
|
||||||
= email
|
= email
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ describe Post do
|
||||||
post = @user.post :status_message, :message => "hello", :to => @aspect.id
|
post = @user.post :status_message, :message => "hello", :to => @aspect.id
|
||||||
xml = post.to_diaspora_xml
|
xml = post.to_diaspora_xml
|
||||||
|
|
||||||
xml.include?(@user.person.id.to_s).should be false
|
xml.include?("person_id").should be false
|
||||||
xml.include?(@user.person.diaspora_handle).should be true
|
xml.include?(@user.person.diaspora_handle).should be true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue