Sha256: 06a24c4f9bdf63f3e17e029dd5ee3aa7c1958c979017caa1b89646d5f731add8
Contents?: true
Size: 614 Bytes
Versions: 6
Compression:
Stored size: 614 Bytes
Contents
require "helper" class ObjectUtilsTest < Minitest::Test 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
6 entries across 6 versions & 2 rubygems