X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/1620856a8a47219f3a2cbb5288137b11467886fc..a16962155a3c3c6616bfe32c7216f3631836d38c:/test/functional/sparklines_controller_test.rb diff --git a/test/functional/sparklines_controller_test.rb b/test/functional/sparklines_controller_test.rb new file mode 100644 index 0000000..7d58be4 --- /dev/null +++ b/test/functional/sparklines_controller_test.rb @@ -0,0 +1,30 @@ +require File.dirname(__FILE__) + '/../test_helper' +require 'sparklines_controller' + +# Re-raise errors caught by the controller. +class SparklinesController; def rescue_action(e) raise e end; end + +class SparklinesControllerTest < Test::Unit::TestCase + + #fixtures :data + + def setup + @controller = SparklinesController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + end + + def test_index + get :index, :results => "1,2,3,4,5", :type => 'bar', :line_color => 'black' + assert_response :success + assert_equal 'image/png', @response.headers['Content-Type'] + end + + # TODO Replace this with your actual tests + def test_show + get :show + assert_response :success + assert_equal 'image/png', @response.headers['Content-Type'] + end + +end