Sha256: 03620e08752a6a71a4e29838c6e90fa66a68c07b3e69a26cf53d8739bc43fdc9
Contents?: true
Size: 571 Bytes
Versions: 1
Compression:
Stored size: 571 Bytes
Contents
# frozen_string_literal: true require 'administrate/field/jsontable' describe Administrate::Field::Jsontable do describe '#to_partial_path' do it 'returns a partial based on the page being rendered' do assert_partial_path(page: :show) end it 'returns a partial for index page' do assert_partial_path(page: :index) end end private def assert_partial_path(page:) field = Administrate::Field::Jsontable.new(:status, 'status', page) path = field.to_partial_path expect(path).to eq("/fields/jsontable/#{page}") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
administrate-field-jsontable-0.1.0 | spec/lib/administrate/field/jsontable_spec.rb |