require "test_helper"
class SiteControllerTest < ActionController::TestCase
- api_fixtures
-
##
# setup oauth keys
def setup
{ :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 },
# 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