Sha256: 6d62d93c95bf3802e6708a50d88c5a8e9950499698ac67f1f54624021c9d996e

Contents?: true

Size: 761 Bytes

Versions: 12

Compression:

Stored size: 761 Bytes

Contents

RSpec.describe TracksListing, type: :listing do
  describe "List entities" do
    let!(:track) { create(:album, tracks_count: 1) }

    let(:listing) { query_listing :tracks }

    it "should list all" do
      expect(listing.items.count).to eq(1)
    end

    it "can be rendered" do
      render_listing :tracks
    end

    it "should get name from model" do
      expect(listing.column_with_key('album_name').human_name).to eq('Album Name')
    end

    it "should get name from title option for column" do
      expect(listing.column_with_key('album_id').human_name).to eq('The Album Id')
    end

    it "should get name from title option for filter" do
      expect(listing.filter_with_key('album_id').human_name).to eq('The Album Id')
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
listings-0.1.15 spec/listings/tracks_listing_spec.rb
listings-0.1.14 spec/listings/tracks_listing_spec.rb
listings-0.1.13 spec/listings/tracks_listing_spec.rb
listings-0.1.12 spec/listings/tracks_listing_spec.rb
listings-0.1.11 spec/listings/tracks_listing_spec.rb
listings-0.1.10 spec/listings/tracks_listing_spec.rb
listings-0.1.8 spec/listings/tracks_listing_spec.rb
listings-0.1.7 spec/listings/tracks_listing_spec.rb
listings-0.1.6 spec/listings/tracks_listing_spec.rb
listings-0.1.5 spec/listings/tracks_listing_spec.rb
listings-0.1.4 spec/listings/tracks_listing_spec.rb
listings-0.1.0 spec/listings/tracks_listing_spec.rb