Mercurial > hg > soundsoftware-site
annotate test/functional/auto_completes_controller_test.rb @ 437:102056ec2de9 bug_169
Introduce a method on the sys controller to clear a repository cache; use a file in the mirror dir to notify the Ruby external repo script that it needs to call it
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Mon, 06 Jun 2011 13:31:44 +0100 |
parents | 1d32c0a0efbf |
children | af80e5618e9b |
rev | line source |
---|---|
Chris@14 | 1 require File.dirname(__FILE__) + '/../test_helper' |
Chris@14 | 2 |
Chris@14 | 3 class AutoCompletesControllerTest < ActionController::TestCase |
Chris@14 | 4 fixtures :all |
Chris@14 | 5 |
Chris@14 | 6 def test_issues_should_not_be_case_sensitive |
Chris@14 | 7 get :issues, :project_id => 'ecookbook', :q => 'ReCiPe' |
Chris@14 | 8 assert_response :success |
Chris@14 | 9 assert_not_nil assigns(:issues) |
Chris@14 | 10 assert assigns(:issues).detect {|issue| issue.subject.match /recipe/} |
Chris@14 | 11 end |
Chris@14 | 12 |
Chris@14 | 13 def test_issues_should_return_issue_with_given_id |
Chris@14 | 14 get :issues, :project_id => 'subproject1', :q => '13' |
Chris@14 | 15 assert_response :success |
Chris@14 | 16 assert_not_nil assigns(:issues) |
Chris@14 | 17 assert assigns(:issues).include?(Issue.find(13)) |
Chris@14 | 18 end |
Chris@14 | 19 |
Chris@14 | 20 end |