Sha256: 1f58e97b1fcc8723c6808ad052eb1a5cd46f3a97a84ca9757f39cbd468e3844d

Contents?: true

Size: 471 Bytes

Versions: 83

Compression:

Stored size: 471 Bytes

Contents

require 'spec_helper'

describe Tenon::Gallery do
  describe '.find_with_photos' do
    it 'should find a gallery, include the photos, and order them by their list order' do
      expect(Tenon::Gallery).to receive(:includes).with(:photos) { Tenon::Gallery }
      expect(Tenon::Gallery).to receive(:order).with('tenon_photos.list_order') { Tenon::Gallery }
      expect(Tenon::Gallery).to receive(:find).with(1)
      Tenon::Gallery.find_with_photos(1)
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
tenon-1.0.43 spec/models/tenon/gallery_spec.rb
tenon-1.0.42 spec/models/tenon/gallery_spec.rb
tenon-1.0.41 spec/models/tenon/gallery_spec.rb
tenon-1.0.40 spec/models/tenon/gallery_spec.rb
tenon-1.0.39 spec/models/tenon/gallery_spec.rb
tenon-1.0.38 spec/models/tenon/gallery_spec.rb
tenon-1.0.37 spec/models/tenon/gallery_spec.rb
tenon-1.0.36 spec/models/tenon/gallery_spec.rb
tenon-1.0.35 spec/models/tenon/gallery_spec.rb
tenon-1.0.33 spec/models/tenon/gallery_spec.rb
tenon-1.0.32 spec/models/tenon/gallery_spec.rb
tenon-1.0.31 spec/models/tenon/gallery_spec.rb
tenon-1.0.30 spec/models/tenon/gallery_spec.rb
tenon-1.0.29 spec/models/tenon/gallery_spec.rb
tenon-1.0.28 spec/models/tenon/gallery_spec.rb
tenon-1.0.27 spec/models/tenon/gallery_spec.rb
tenon-1.0.26 spec/models/tenon/gallery_spec.rb
tenon-1.0.25 spec/models/tenon/gallery_spec.rb
tenon-1.0.24 spec/models/tenon/gallery_spec.rb
tenon-1.0.23 spec/models/tenon/gallery_spec.rb