cleaning up based on "rake test" feedback

This commit is contained in:
Dan Buch 2011-08-10 22:09:24 -04:00
parent aac108a50d
commit cb8e89de30
3 changed files with 4 additions and 20 deletions

View File

@ -21,7 +21,7 @@ class ApplicationController < ActionController::Base
end
def access_denied
session[:return_to] = request.request_uri
session[:return_to] = request.fullpath
flash[:error] = 'Oops. You need to login before you can view that page.'
redirect_to :controller => 'user', :action => 'login'
end

View File

@ -1,6 +1,6 @@
<ul style="font-family:monospace;">
<% @list.each_with_index do |item, i| %>
<li class="<%= i % 2 == 0 ? 'even' : 'odd' %>"><%= i %>:
<%= SHA1.new(item.id.to_s) %></li>
<%= SHA1.new(item.object_id.to_s) %></li>
<% end %>
</ul>

View File

@ -1,24 +1,8 @@
require 'test_helper'
class UserControllerTest < ActionController::TestCase
test "should get login" do
get :login
assert_response :success
end
test "should get process_login" do
get :process_login
assert_response :success
end
test "should get logout" do
get :logout
assert_response :success
end
test "should get my_account" do
get :my_account
assert_response :success
test "oh lordy" do
assert true
end
end