Sha256: c03e1bedaeb690b7c396de5f841a61e0f1583d57546ee2b140e61f1f4eb6ca74

Contents?: true

Size: 841 Bytes

Versions: 9

Compression:

Stored size: 841 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class DefaultControllerTest < ActionController::TestCase

  tests DefaultController

  context "default controller" do
    
    context 'on GET to index' do
      # The default view calls the upload_form helper.  This isn't a great test but
      # it will make sure it doesn't blow up
      setup do
        @user = Factory(:user)
        get :index, :user_id => @user.to_param
      end
      should_respond_with :success
      should "have a_container_with_a_long_name in the body" do
        assert @response.body.include?('a_container_with_a_long_name')
      end
      should "have '1 MB' in the body" do
        assert @response.body.include?('1 MB')
      end
      should "have '*.jpg' in the body" do
        assert @response.body.include?('*.jpg')
      end
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
uploader-0.2.8 test/rails_root/test/functional/default_controller_test.rb
uploader-0.2.7 test/rails_root/test/functional/default_controller_test.rb
uploader-0.2.6 test/rails_root/test/functional/default_controller_test.rb
uploader-0.2.5 test/rails_root/test/functional/default_controller_test.rb
uploader-0.2.4 test/rails_root/test/functional/default_controller_test.rb
uploader-0.2.3 test/rails_root/test/functional/default_controller_test.rb
uploader-0.2.2 test/rails_root/test/functional/default_controller_test.rb
uploader-0.2.1 test/rails_root/test/functional/default_controller_test.rb
uploader-0.2.0 test/rails_root/test/functional/default_controller_test.rb