Sha256: 5a099c0d098833e9f84a815fa7c9a467403cbe9aff41ce815e2ef9c613ea5251

Contents?: true

Size: 771 Bytes

Versions: 2

Compression:

Stored size: 771 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(:params).and_return(ActionController::Parameters.new(acquired_from: '2012-01-01', controller: "items"))
      rendered = helper.circulation_status_facet(facet)
      puts rendered
      expect(rendered).to have_link "Available on Shelf (10)", href: "/items?acquired_from=2012-01-01&circulation_status=Available+On+Shelf"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enju_circulation-0.2.0 spec/helpers/items_helper_spec.rb
enju_circulation-0.2.0.beta.4 spec/helpers/items_helper_spec.rb