]> git.openstreetmap.org Git - rails.git/blob - test/functional/export_controller_test.rb
Added test for changeset/download hiding redacted elements
[rails.git] / test / functional / export_controller_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class ExportControllerTest < ActionController::TestCase
4
5   ##
6   # test all routes which lead to this controller
7   def test_routes
8     assert_routing(
9       { :path => "/export/start", :method => :get },
10       { :controller => "export", :action => "start" }
11     )
12     assert_routing(
13       { :path => "/export/finish", :method => :post },
14       { :controller => "export", :action => "finish" }
15     )
16   end
17
18   def test_start
19     xhr :get, :start
20     assert_response :success
21     assert_template 'start'
22   end
23   
24   def test_finish_osm
25     get :finish, {:minlon => 0, :minlat => 50, :maxlon => 1, :maxlat => 51, :format => 'osm'}
26     assert_response :redirect
27   end
28   
29   def test_finish_mapnik
30     get :finish, {:minlon => 0, :minlat => 50, :maxlon => 1, :maxlat => 51, :format => 'mapnik', :mapnik_format => 'test', :mapnik_scale => '12'}
31     assert_response :redirect
32   end
33
34 end