]> git.openstreetmap.org Git - rails.git/blob - test/controllers/swf_controller_test.rb
Moar tests!
[rails.git] / test / controllers / swf_controller_test.rb
1 require "test_helper"
2
3 class SwfControllerTest < ActionController::TestCase
4   ##
5   # test all routes which lead to this controller
6   def test_routes
7     assert_routing(
8       { :path => "/api/0.6/swf/trackpoints", :method => :get },
9       { :controller => "swf", :action => "trackpoints" }
10     )
11   end
12
13   ##
14   # basic test that trackpoints at least returns some sort of flash movie
15   def test_trackpoints
16     get :trackpoints, :xmin => 51, :xmax => 52, :ymin => -1, :ymax => 1, :baselong => 0, :basey => 0, :masterscale => 1
17     assert_response :success
18     assert_equal "application/x-shockwave-flash", response.content_type
19     assert_match /^FWS/, response.body
20   end
21 end