Sha256: de48b642a8c94d068baf0f8abed5d697a7de485e8fdf9738619d63b355e354e6

Contents?: true

Size: 403 Bytes

Versions: 26

Compression:

Stored size: 403 Bytes

Contents

require "administrate/field/nested_has_many"

describe Administrate::Field::NestedHasMany do
  describe "#to_partial_path" do
    it "returns a partial based on the page being rendered" do
      page = :show
      field = Administrate::Field::NestedHasMany.new(:relation, "/a.jpg", page)

      path = field.to_partial_path

      expect(path).to eq("/fields/nested_has_many/#{page}")
    end
  end
end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
administrate-field-nested_has_many-2.1.0 spec/lib/administrate/field/nested_has_many_spec.rb
administrate-field-nested_has_many-2.0.0 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-300.0.6 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-300.0.5 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-300.0.4 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-300.0.2 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-300.0.1 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-5.4.0 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-5.0.1 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-5.0.0 spec/lib/administrate/field/nested_has_many_spec.rb
administrate-field-nested_has_many-1.3.0 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-4.0.0 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-3.0.0 spec/lib/administrate/field/nested_has_many_spec.rb
viniBaxter-spa-nested_has_many-2.0.0 spec/lib/administrate/field/nested_has_many_spec.rb
administrate-field-nested_has_many-1.2.0 spec/lib/administrate/field/nested_has_many_spec.rb
worker-field-nested_has_many-0.7.0 spec/lib/worker/field/nested_has_many_spec.rb
worker-field-nested_has_many-0.6.0 spec/lib/worker/field/nested_has_many_spec.rb
worker-field-nested_has_many-0.5.0 spec/lib/worker/field/nested_has_many_spec.rb
worker-field-nested_has_many-0.4.0 spec/lib/worker/field/nested_has_many_spec.rb
worker-field-nested_has_many-0.3.0 spec/lib/worker/field/nested_has_many_spec.rb