]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/site_controller_test.rb
Refactor AMF encodevalue routine
[rails.git] / test / controllers / site_controller_test.rb
index 681df794525bd5764822f48279e4f66296bb2034..58379c0ea7fe8b6586f2545e8f34e9d28f678b32 100644 (file)
@@ -1,8 +1,6 @@
 require "test_helper"
 
 class SiteControllerTest < ActionController::TestCase
-  api_fixtures
-
   ##
   # setup oauth keys
   def setup
@@ -75,8 +73,8 @@ class SiteControllerTest < ActionController::TestCase
       { :controller => "site", :action => "permalink", :code => "shortcode" }
     )
     assert_routing(
-      { :path => "/preview/formatname", :method => :post },
-      { :controller => "site", :action => "preview", :format => "formatname" }
+      { :path => "/preview/typename", :method => :post },
+      { :controller => "site", :action => "preview", :type => "typename" }
     )
     assert_routing(
       { :path => "/id", :method => :get },
@@ -367,13 +365,13 @@ class SiteControllerTest < ActionController::TestCase
 
   # Test the rich text preview
   def test_preview
-    xhr :post, :preview, :format => "html"
+    xhr :post, :preview, :type => "html"
     assert_response :success
 
-    xhr :post, :preview, :format => "markdown"
+    xhr :post, :preview, :type => "markdown"
     assert_response :success
 
-    xhr :post, :preview, :format => "text"
+    xhr :post, :preview, :type => "text"
     assert_response :success
   end