Sha256: 51be841d1752fba5eec5f9593272535682080f0743263d41aa95f1eb7f86dfb4
Contents?: true
Size: 487 Bytes
Versions: 14
Compression:
Stored size: 487 Bytes
Contents
require File.expand_path("../helper.rb", __FILE__) class ReservedTest < MiniTest::Unit::TestCase include FriendlyId::Test class Journalist < ActiveRecord::Base extend FriendlyId friendly_id :name end def model_class Journalist end test "should reserve 'new' and 'edit' by default" do ["new", "edit"].each do |word| transaction do assert_raises(ActiveRecord::RecordInvalid) {model_class.create! :name => word} end end end end
Version data entries
14 entries across 14 versions & 2 rubygems