~singpolyma/sgx-jmp

2f58cccd521e5b017115681f5bc670cdf9b77f25 — Stephen Paul Weber 3 months ago 229ba3e
Return exact matches only

By default bandwidth includes numbers in the "local calling area" of a search.
This is confusing, so change it to include only actual matches.
2 files changed, 3 insertions(+), 3 deletions(-)

M lib/tel_selections.rb
M test/test_tel_selections.rb
M lib/tel_selections.rb => lib/tel_selections.rb +1 -1
@@ 64,7 64,7 @@ class TelSelections
				new(
					Q
					.for(form.field("q").value.to_s.strip).iris_query
					.merge(enableTNDetail: true)
					.merge(enableTNDetail: true, LCA: false)
					.merge(Quantity.for(form).iris_query)
				)
			end

M test/test_tel_selections.rb => test/test_tel_selections.rb +2 -2
@@ 31,7 31,7 @@ class TelSelectionsTest < Minitest::Test
				.for(form)
				.instance_variable_get(:@iris_query)
			assert_equal(
				{ areaCode: "226", enableTNDetail: true, quantity: 10 },
				{ areaCode: "226", enableTNDetail: true, LCA: false, quantity: 10 },
				iris_query
			)
		end


@@ 49,7 49,7 @@ class TelSelectionsTest < Minitest::Test
				.for(form)
				.instance_variable_get(:@iris_query)
			assert_equal(
				{ areaCode: "226", enableTNDetail: true, quantity: 500 },
				{ areaCode: "226", enableTNDetail: true, LCA: false, quantity: 500 },
				iris_query
			)
		end