Sha256: 6f63ee44f6e13316f253d83fc2b471e863de861c789607620e2ef3bc2280f78d

Contents?: true

Size: 529 Bytes

Versions: 7

Compression:

Stored size: 529 Bytes

Contents

require "spec_helper.rb"

describe "loc_search/index" do
  describe "loc search menu" do
    it "should reflect query params for views", vcr: true do
      params[:query] = "test"
      assign(:query, "test")
      books = LocSearch.search(params[:query])
      assign(:books, Kaminari.paginate_array(books[:items], total_count: books[:total_entries]).page(1).per(10))
      render
      expect(rendered).to include "https://catalog.loc.gov/vwebv/search?searchArg=test&searchCode=GKEY%5E*&searchType=0"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
enju_loc-0.3.1 spec/views/loc_search/index.html.erb_spec.rb
enju_loc-0.3.0 spec/views/loc_search/index.html.erb_spec.rb
enju_loc-0.3.0.beta.1 spec/views/loc_search/index.html.erb_spec.rb
enju_loc-0.2.0 spec/views/loc_search/index.html.erb_spec.rb
enju_loc-0.2.0.beta.3 spec/views/loc_search/index.html.erb_spec.rb
enju_loc-0.2.0.beta.2 spec/views/loc_search/index.html.erb_spec.rb
enju_loc-0.2.0.beta.1 spec/views/loc_search/index.html.erb_spec.rb