Sha256: c0d3df878269175e673d4f5d5bf90e051da7bb956cb6505634bd66fa30080bf3

Contents?: true

Size: 823 Bytes

Versions: 5

Compression:

Stored size: 823 Bytes

Contents

require 'rails_helper'

# describe ItemsHelper do
#   describe "string concat" do
#     it "concats two strings with spaces" do
#       expect(helper.concat_strings("this","that")).to eq("this that")
#     end
#   end
# end
describe ItemsHelper, type: :helper do
  describe "#circulation_status_facet" do
    it "should respect other params" do
      facet = double(:facet, value: "Available On Shelf", count: 10)
      helper.stub(:filtered_params).and_return(ActionController::Parameters.new(acquired_from: '2012-01-01', controller: "items").permit([:acquired_from, :controller]))
      rendered = helper.circulation_status_facet(facet)
      expect(rendered).to have_link "#{CirculationStatus.find(2).display_name} (10)" #, href: "/items?acquired_from=2012-01-01&circulation_status=Available+On+Shelf"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
enju_circulation-0.4.0.rc.1 spec/helpers/items_helper_spec.rb
enju_circulation-0.4.0.beta.4 spec/helpers/items_helper_spec.rb
enju_circulation-0.4.0.beta.3 spec/helpers/items_helper_spec.rb
enju_circulation-0.4.0.beta.2 spec/helpers/items_helper_spec.rb
enju_circulation-0.4.0.beta.1 spec/helpers/items_helper_spec.rb