Sha256: fa43c070f19d13e3d04cae4653e08b78949c2dd2e8e6d1ffcfc5726bbbe593dc
Contents?: true
Size: 729 Bytes
Versions: 8
Compression:
Stored size: 729 Bytes
Contents
require "test_helper" class Admin::PostsControllerTest < ActionController::TestCase setup do Post.delete_all @post = Factory(:post) end should "render index and return xml" do expected = <<-RAW <?xml version="1.0" encoding="UTF-8"?> <posts type="array"> <post> <title>#{@post.title}</title> <status>#{@post.status}</status> </post> </posts> RAW get :index, :format => "xml" assert_response :success assert_equal expected, @response.body end should "render index and return csv" do expected = <<-RAW title;status #{@post.title};#{@post.status} RAW get :index, :format => "csv" assert_response :success assert_equal expected, @response.body end end
Version data entries
8 entries across 8 versions & 1 rubygems