Sha256: 3e5e3deaa8cb1bfd3faf53366e07936f164a5959a3696633983047b308903716

Contents?: true

Size: 995 Bytes

Versions: 10

Compression:

Stored size: 995 Bytes

Contents

require 'test_helper'

# The default partial for testing holding section. 
#
# NOT fully tested, this is just a start. 
#
# Mocking up things to test a real request is worse than it should be
# in Umlaut, 10 year old code some places, sorry! 
class HoldingTest < ActionView::TestCase
	def setup
		# Not sure why ActionView::TestCase isn't initializing a rails request for us
		request ||= ActionController::TestRequest.new
		@user_request = Request.find_or_create({}, session, request)
	end

	def test_includes_holding_search
		holding_responses = [
			ServiceResponse.create_from_hash(:count => "10",
            :display_text => "10 possible matches in catalog", 
            :url => "http://catalog.example.org",
            :service_type_value => "holding_search",
            :service_id => "DummyService")
		]

		render "resolve/holding", :holding => holding_responses

		assert_select ".umlaut-holding-search"
		assert_select ".umlaut-unavailable", 0
	end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
umlaut-4.0.0.beta3 ./test/view/holding_test.rb
umlaut-4.0.0.beta2 ./test/view/holding_test.rb
umlaut-4.0.0.beta1 ./test/view/holding_test.rb
umlaut-3.3.1 ./test/view/holding_test.rb
umlaut-3.3.0 ./test/view/holding_test.rb
umlaut-3.2.0 ./test/view/holding_test.rb
umlaut-3.1.1 ./test/view/holding_test.rb
umlaut-3.1.0 ./test/view/holding_test.rb
umlaut-3.1.0.pre2 ./test/view/holding_test.rb
umlaut-3.1.0.pre1 ./test/view/holding_test.rb