source: subversion/sites/rails_port/test/functional/old_way_controller_test.rb @ 7106

Last change on this file since 7106 was 7106, checked in by frederik, 11 years ago
  • add old_relation_controller and stuff so that relation history works. fixes #557.
  • minor testing fixes.
File size: 799 bytes
RevLine 
[7106]1require File.dirname(__FILE__) + '/../test_helper'
2require 'old_way_controller'
3
4# Re-raise errors caught by the controller.
5class OldWayController; def rescue_action(e) raise e end; end
6
7class OldWayControllerTest < Test::Unit::TestCase
8  api_fixtures
9
10  def setup
11    @controller = OldWayController.new
12    @request    = ActionController::TestRequest.new
13    @response   = ActionController::TestResponse.new
14  end
15
16  # -------------------------------------
17  # Test reading old ways.
18  # -------------------------------------
19
20  def test_history
21    # check that a visible way is returned properly
22    get :history, :id => ways(:visible_way).id
23    assert_response :success
24
25    # check chat a non-existent way is not returned
26    get :history, :id => 0
27    assert_response :not_found
28
29  end
30
31end
Note: See TracBrowser for help on using the repository browser.