Sha256: 45bddc71b87d7f8d8ebfe75eca8135e7a60e671fb9bf85c238a6cb99a879afc8

Contents?: true

Size: 637 Bytes

Versions: 1

Compression:

Stored size: 637 Bytes

Contents

require "spec_helper"

module Refinery
  module Blog
    describe PostsController, type: :controller do
      before do
        FactoryBot.create(:blog_post, :title => "blogpost_one")
        FactoryBot.create(:blog_post, :title => "blogpost_two")
        FactoryBot.create(:blog_post, :title => "blogpost_three")
      end

      it "should not limit rss feed" do
        get :index, :format => :rss
        expect(assigns[:posts].size).to eq(3)
      end

      it "should limit rss feed" do
        get :index, :format => :rss, params: { :max_results => 2 }
        expect(assigns[:posts].count).to eq(2)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
refinerycms-blog-4.0.0 spec/controllers/refinery/blog/posts_controller_spec.rb