public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
insoshi / spec / controllers / password_reminders_controller_spec.rb
100644 25 lines (20 sloc) 0.585 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require File.dirname(__FILE__) + '/../spec_helper'
 
describe PasswordRemindersController do
  integrate_views
  
  before(:each) do
    @emails = ActionMailer::Base.deliveries
    @emails.clear
    @person = people(:quentin)
  end
  
  it "should render the new email reminder page" do
    get :new
    response.should be_success
    response.should render_template("new")
  end
  
  it "should deliver a reminder" do
    lambda do
      post :create, :person => { :email => @person.email }
      response.should be_redirect
    end.should change(@emails, :length).by(1)
  end
end