Sha256: b374c1b8a677e114781cfeecdf6cb7584279b90fd3897d00c96d7c66c0cf5af8

Contents?: true

Size: 611 Bytes

Versions: 1

Compression:

Stored size: 611 Bytes

Contents

require File.expand_path('../spec_helper', File.dirname(__FILE__))
include Kaminari::ActionViewExtension

describe 'Kaminari::ActionViewExtension' do
  describe '#paginate' do
    before do
      @author = User.create! :name => 'author'
      @books = 2.times.map { @author.books_authored.create! }
      @books = Book.page(1)
    end
    subject { paginate( @books ) }
    it { should be_a(String) }

    context "escaping the pagination for javascript" do
      it "should escape for javascript" do
        lambda { escape_javascript( paginate( @books ) ) }.should_not raise_error
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kaminari-0.12.4 spec/helpers/action_view_extension_spec.rb