Fix rspec specs
This commit is contained in:
parent
700927e40f
commit
dde4b30180
3 changed files with 3 additions and 3 deletions
|
|
@ -82,7 +82,7 @@ class InvitationsController < Devise::InvitationsController
|
||||||
|
|
||||||
def email
|
def email
|
||||||
@invs = []
|
@invs = []
|
||||||
@resource = User.find_by_invitation_token(params[:invitation_token])
|
@resource = User.find_by_invitation_token(params[:invitation_token])
|
||||||
render 'devise/mailer/invitation_instructions', :layout => false
|
render 'devise/mailer/invitation_instructions', :layout => false
|
||||||
end
|
end
|
||||||
protected
|
protected
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
- @invs = @resource.invitations_to_me
|
||||||
-if @invs.count > 0
|
-if @invs.count > 0
|
||||||
!!!
|
!!!
|
||||||
%html
|
%html
|
||||||
|
|
@ -8,7 +9,6 @@
|
||||||
%header
|
%header
|
||||||
= image_tag AppConfig[:pod_url] + 'images/logo_caps.png'
|
= image_tag AppConfig[:pod_url] + 'images/logo_caps.png'
|
||||||
#container
|
#container
|
||||||
- @invs = @resource.invitations_to_me
|
|
||||||
%p
|
%p
|
||||||
= t('devise.mailer.welcome', :email => @resource.email)
|
= t('devise.mailer.welcome', :email => @resource.email)
|
||||||
= render :partial => 'inviters'
|
= render :partial => 'inviters'
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ describe Invitation do
|
||||||
context 'with no inviter' do
|
context 'with no inviter' do
|
||||||
it 'sends an email that includes the right things' do
|
it 'sends an email that includes the right things' do
|
||||||
Invitation.create_invitee(:service => 'email', :identifier => @email)
|
Invitation.create_invitee(:service => 'email', :identifier => @email)
|
||||||
Devise.mailer.deliveries.first.to_s.should include("Welcome #{@email}")
|
Devise.mailer.deliveries.first.to_s.should include("Email not displaying correctly?")
|
||||||
end
|
end
|
||||||
it 'creates a user' do
|
it 'creates a user' do
|
||||||
expect {
|
expect {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue