end
def test_confirm_resend_success
+ session[:token] = users(:inactive_user).tokens.create.token
+
assert_difference "ActionMailer::Base.deliveries.size", 1 do
get :confirm_resend, :display_name => users(:inactive_user).display_name
end
ActionMailer::Base.deliveries.clear
end
- def test_confirm_resend_failure
+ def test_confirm_resend_no_token
+ assert_no_difference "ActionMailer::Base.deliveries.size" do
+ get :confirm_resend, :display_name => users(:inactive_user).display_name
+ end
+
+ assert_response :redirect
+ assert_redirected_to login_path
+ assert_match "User Inactive User not found.", flash[:error]
+ end
+
+ def test_confirm_resend_unknown_user
assert_no_difference "ActionMailer::Base.deliveries.size" do
get :confirm_resend, :display_name => "No Such User"
end
get :list, :page => 3
assert_response :success
assert_template :list
- assert_select "table#user_list tr", :count => 19
+ assert_select "table#user_list tr", :count => 22
end
def test_list_post_confirm