Sha256: f7c02a355f463d2c7d03313c22cd907453d87154f97988f19474bcd0c0ccffa2

Contents?: true

Size: 881 Bytes

Versions: 23

Compression:

Stored size: 881 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../rails_test_helper')

class Facebooker::Rails::FacebookUrlRewritingTest < Test::Unit::TestCase

  def setup
    @request = ActionController::TestRequest.new
    @params = {}
    @rewriter = ActionController::UrlRewriter.new(@request, @params)
  end

  def test_one_or_true_on_string_1
    assert @rewriter.one_or_true( "1" )
  end
  
  def test_one_or_true_on_string_0
    assert !@rewriter.one_or_true( "0" )
  end

  def test_one_or_true_on_integer_1
    assert @rewriter.one_or_true( 1 )
  end

  def test_one_or_true_on_float_1
    assert @rewriter.one_or_true( 1.0 )
  end
  
  def test_one_or_true_on_true
    assert @rewriter.one_or_true( true )
  end

  def test_one_or_true_on_false
    assert !@rewriter.one_or_true( false )
  end

  def test_one_or_true_on_nil
    assert !@rewriter.one_or_true( nil )
  end

end

Version data entries

23 entries across 23 versions & 7 rubygems

Version Path
fs-facebooker-1.0.37 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.36 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.37 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.38 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.39 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.40 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.41 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.42 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.43 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.44 test/facebooker/rails/facebook_url_rewriting_test.rb
mmangino-facebooker-1.0.45 test/facebooker/rails/facebook_url_rewriting_test.rb
mwilliams-facebooker-1.0.40 test/facebooker/rails/facebook_url_rewriting_test.rb
simianarmy-facebooker-1.0.40 test/facebooker/rails/facebook_url_rewriting_test.rb
taweili-facebooker-1.0.37 test/facebooker/rails/facebook_url_rewriting_test.rb
taweili-facebooker-1.0.38 test/facebooker/rails/facebook_url_rewriting_test.rb
taweili-facebooker-1.0.40 test/facebooker/rails/facebook_url_rewriting_test.rb
taweili-facebooker-1.0.41 test/facebooker/rails/facebook_url_rewriting_test.rb
taweili-facebooker-1.0.45 test/facebooker/rails/facebook_url_rewriting_test.rb
zerobearing2-facebooker-1.0.46 test/facebooker/rails/facebook_url_rewriting_test.rb
facebooker-1.0.41 test/facebooker/rails/facebook_url_rewriting_test.rb