Ignore:
Timestamp:
Aug 10, 2009, 6:14:35 PM (15 years ago)
Author:
KOBAYASHI, Shinji
Message:

added terminology controller test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/test/functional/terminology_controller_test.rb

    r167 r180  
    22
    33class TerminologyControllerTest < ActionController::TestCase
    4   # Replace this with your real tests.
    5   def test_truth
    6     assert true
     4  fixtures :terminologies
     5
     6#  def setup
     7#    @controller = TerminologyController.new
     8#    @request = ActionController::TestRequest.new
     9#    @response = ActionController::TestResponse.new
     10#  end
     11
     12  def test_generate_get_route
     13    assert_generates('/terminology/openehr/en/1', :controller => 'terminology',
     14                     :action => 'show', :name => 'openehr', :lang => 'en',
     15                     :code => '1')
     16  end
     17
     18  def test_should_get
     19    get :show, :name => 'openehr', :lang => 'en', :code => '0'
     20    assert_select 'rubric', 'self'
     21  end
     22
     23  def test_shoud_get_not_found
     24    get :show, :name => 'openehr', :lang => 'en', :code => '1'
     25    assert_response :missing
    726  end
    827end
Note: See TracChangeset for help on using the changeset viewer.