Sha256: 1729f44e16c3062c7f8a4740b99ac76d676b2b6f1abe9ff1f1d9e5e2165167db
Contents?: true
Size: 624 Bytes
Versions: 13
Compression:
Stored size: 624 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.table_name = "authors" end assert model_class.new.unfriendly_id? end end
Version data entries
13 entries across 13 versions & 1 rubygems