Sha256: df9ddedf592fef31e59960bda3e8c166a45215361d9ad010610ee6a65f701097

Contents?: true

Size: 511 Bytes

Versions: 14

Compression:

Stored size: 511 Bytes

Contents

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

class RedirectTest < Test::Unit::TestCase
  fixtures :redirects

  # Replace this with your real tests.
  def test_exists
    assert_kind_of Redirect, redirects(:foo_redirect)
    assert_kind_of Redirect, redirects(:archive1_redirect)
  end

  def test_uniqueness
    assert_equal redirects(:foo_redirect), Redirect.find_by_from_path('foo/bar')
    redir = Redirect.new
    redir.from_path = 'foo/bar'
    redir.to_path = '/'
    assert !redir.save
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
typo-3.99.0 test/unit/redirect_test.rb
typo-3.99.3 test/unit/redirect_test.rb
typo-3.99.2 test/unit/redirect_test.rb
typo-3.99.1 test/unit/redirect_test.rb
typo-4.0.1 test/unit/redirect_test.rb
typo-4.0.0 test/unit/redirect_test.rb
typo-4.0.2 test/unit/redirect_test.rb
typo-3.99.4 test/unit/redirect_test.rb
typo-4.0.3 test/unit/redirect_test.rb
typo-4.1.1 test/unit/redirect_test.rb
typo-5.0.1 test/unit/redirect_test.rb
typo-4.1 test/unit/redirect_test.rb
typo-5.0.2 test/unit/redirect_test.rb
typo-5.0 test/unit/redirect_test.rb