Sha256: 3fee816134286c48e4a9840fdcde55455e2d956ca8e002a62d517e48965e2470
Contents?: true
Size: 657 Bytes
Versions: 30
Compression:
Stored size: 657 Bytes
Contents
require "helper" class ObjectUtilsTest < MiniTest::Unit::TestCase include FriendlyId::Test test "strings with letters are friendly_ids" do assert "a".friendly_id? end test "integers should be unfriendly ids" do assert 1.unfriendly_id? end test "numeric strings are neither friendly nor unfriendly" do assert_equal nil, "1".friendly_id? assert_equal nil, "1".unfriendly_id? end test "ActiveRecord::Base instances should be unfriendly_ids" do model_class = Class.new(ActiveRecord::Base) do self.abstract_class = true self.table_name = "authors" end assert model_class.new.unfriendly_id? end end
Version data entries
30 entries across 25 versions & 4 rubygems