Sha256: 8bcc298fe0319fc1d1c9a9a75f0ed9ba0e134bbf71bdd433ac91bf868054d931

Contents?: true

Size: 662 Bytes

Versions: 30

Compression:

Stored size: 662 Bytes

Contents

require File.expand_path("../ar_test_helper", __FILE__)

module FriendlyId
  module Test
    module ActiveRecordAdapter
      module Slugged

        test "should allow eager loading of slugs" do
          assert_nothing_raised do
            klass.find(instance.friendly_id, :include => :slugs)
          end

          assert_nothing_raised do
            klass.find(instance.friendly_id, :include => :slug)
          end
        end

        def klass
          Post
        end

        def other_class
          District
        end

        def instance
          @instance ||= klass.create! :name => "hello world"
        end

      end
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
friendly_id-3.3.3.0 test/active_record_adapter/slugged.rb
friendly_id-3.3.2.0 test/active_record_adapter/slugged.rb
friendly_id_globalize3-3.2.1.6 test/active_record_adapter/slugged.rb
friendly_id-3.3.1.1 test/active_record_adapter/slugged.rb
friendly_id-3.3.1 test/active_record_adapter/slugged.rb
friendly_id-3.3.0.1 test/active_record_adapter/slugged.rb
friendly_id_globalize3-3.2.1.5 test/active_record_adapter/slugged.rb
friendly_id-3.3.0.rc2 test/active_record_adapter/slugged.rb
friendly_id-3.3.0.rc1 test/active_record_adapter/slugged.rb
friendly_id_globalize3-3.2.1.4 test/active_record_adapter/slugged.rb
friendly_id-3.3.0.alpha2 test/active_record_adapter/slugged.rb
friendly_id-3.3.0.alpha1 test/active_record_adapter/slugged.rb
friendly_id_globalize3-3.2.1.3 test/active_record_adapter/slugged.rb
friendly_id_globalize3-3.2.1.2 test/active_record_adapter/slugged.rb
friendly_id_globalize3-3.2.1.1 test/active_record_adapter/slugged.rb
friendly_id-3.2.1.1 test/active_record_adapter/slugged.rb
friendly_id_globalize3-3.2.1 test/active_record_adapter/slugged.rb
friendly_id-3.2.1 test/active_record_adapter/slugged.rb
friendly_id_globalize3-3.2.0 test/active_record_adapter/slugged.rb
friendly_id-3.2.0 test/active_record_adapter/slugged.rb