merged in changes from live version
[selectricity] / test / functional / sparklines_controller_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2 require 'sparklines_controller'
3
4 # Re-raise errors caught by the controller.
5 class SparklinesController; def rescue_action(e) raise e end; end
6
7 class SparklinesControllerTest < Test::Unit::TestCase
8
9   #fixtures :data
10
11   def setup
12     @controller = SparklinesController.new
13     @request    = ActionController::TestRequest.new
14     @response   = ActionController::TestResponse.new
15   end
16
17   def test_index
18     get :index, :results => "1,2,3,4,5", :type => 'bar', :line_color => 'black'
19     assert_response :success
20     assert_equal 'image/png', @response.headers['Content-Type']
21   end
22
23   # TODO Replace this with your actual tests
24   def test_show
25     get :show
26     assert_response :success
27     assert_equal 'image/png', @response.headers['Content-Type']
28   end
29   
30 end

Benjamin Mako Hill || Want to submit a patch?