flash[:notice] = t 'user.new.flash create success message', :email => @user.email
Notifier.deliver_signup_confirm(@user, @user.tokens.create(:referer => params[:referer]))
session[:token] = @user.tokens.create.token
- redirect_to :action => 'login'
+ redirect_to :action => 'login', :referer => params[:referer]
else
- render :action => 'new'
+ render :action => 'new', :referer => params[:referer]
end
end
end
assert_match /#{@url}/, register_email.body
# Check the page
- assert_redirected_to :action => 'login'
+ assert_redirected_to :action => 'login', :referer => nil
ActionMailer::Base.deliveries.clear
end