Show More
Commit Description:
updated db/schema.rb: removed unused tables
Commit Description:
updated db/schema.rb: removed unused tables
References:
File last commit:
Show/Diff file:
Action:
test/functional/main_controller_test.rb
| 20 lines
| 506 B
| text/x-ruby
| RubyLexer
|
|
r275 | require File.dirname(__FILE__) + '/../test_helper' | ||
|
r0 | |||
|
r275 | class MainControllerTest < ActionController::TestCase | ||
fixtures :users | ||||
|
r58 | fixtures :problems | ||
def test_should_redirect_new_user_to_login | ||||
get :list | ||||
|
r275 | assert_redirected_to :controller => 'main', :action => 'login' | ||
|
r0 | end | ||
|
r58 | |||
def test_should_list_available_problems_if_logged_in | ||||
john = users(:john) | ||||
get :list, {}, {:user_id => john.id} | ||||
assert_template 'main/list' | ||||
assert_select "table tr:nth-child(2)", :text => /\(add\)/ | ||||
end | ||||
|
r0 | end | ||