Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update tests a bit

  • Loading branch information...
commit cdb8ead5a5b975d0c610cbb35bce48b082da6e9e 1 parent 0b52db1
Eric Waller erwaller authored
Showing with 11 additions and 10 deletions.
  1. +6 −5 test/samples/venues.json
  2. +5 −5 test/test_soulmate.rb
11 test/samples/venues.json
View
@@ -1,5 +1,6 @@
-{"id":1,"term":"Dodger Stadium","score":85,"data":{"url":"\/dodger-stadium-tickets\/","subtitle":"Los Angeles, CA"},"aliases":["Chavez Ravine"]}
-{"id":28,"term":"Angel Stadium","score":85,"data":{"url":"\/angel-stadium-tickets\/","subtitle":"Anaheim, CA"},"aliases":["Edison International Field of Anaheim"]}
-{"id":30,"term":"Chase Field ","score":85,"data":{"url":"\/chase-field-tickets\/","subtitle":"Phoenix, AZ"},"aliases":["Bank One Ballpark", "Bank One Stadium"]}
-{"id":29,"term":"Sun Life Stadium","score":84,"data":{"url":"\/sun-life-stadium-tickets\/","subtitle":"Miami, FL"},"aliases":["Dolphins Stadium","Land Shark Stadium"]}
-{"id":2,"term":"Turner Field","score":83,"data":{"url":"\/turner-field-tickets\/","subtitle":"Atlanta, GA"}}
+{"id":1,"term":"Dodger Stadium","score":84,"data":{"url":"\/dodger-stadium-tickets\/","subtitle":"Los Angeles, CA"},"aliases":["Chavez Ravine"]}
+{"id":28,"term":"Angel Stadium","score":90,"data":{"url":"\/angel-stadium-tickets\/","subtitle":"Anaheim, CA"},"aliases":["Edison International Field of Anaheim"]}
+{"id":30,"term":"Chase Field ","score":80,"data":{"url":"\/chase-field-tickets\/","subtitle":"Phoenix, AZ"},"aliases":["Bank One Ballpark", "Bank One Stadium"]}
+{"id":29,"term":"Sun Life Stadium","score":75,"data":{"url":"\/sun-life-stadium-tickets\/","subtitle":"Miami, FL"},"aliases":["Dolphins Stadium","Land Shark Stadium"]}
+{"id":2,"term":"Turner Field","score":50,"data":{"url":"\/turner-field-tickets\/","subtitle":"Atlanta, GA"}}
+{"id":3,"term":"Citi Field","score":92,"data":{"url":"\/citi-field-tickets\/","subtitle":"Atlanta, GA"},"aliases":["Shea Stadium"]}
10 test/test_soulmate.rb
View
@@ -10,13 +10,13 @@ def test_integration_can_load_values_and_query
items_loaded = Soulmate::Loader.new('venues').load(items)
- assert_equal 5, items_loaded
+ assert_equal 6, items_loaded
matcher = Soulmate::Matcher.new('venues')
results = matcher.matches_for_term('stad', :limit => 5)
- assert_equal 3, results.size
- assert_equal 'Angel Stadium', results[0]['term']
+ assert_equal 5, results.size
+ assert_equal 'Citi Field', results[0]['term']
end
def test_integration_can_load_values_and_query_via_aliases
@@ -28,7 +28,7 @@ def test_integration_can_load_values_and_query_via_aliases
items_loaded = Soulmate::Loader.new('venues').load(items)
- assert_equal 5, items_loaded
+ assert_equal 6, items_loaded
matcher = Soulmate::Matcher.new('venues')
results = matcher.matches_for_term('land shark stadium', :limit => 5)
@@ -40,6 +40,6 @@ def test_integration_can_load_values_and_query_via_aliases
# this shouldn't happen due to Redis doing an intersect, but just in case!
results = matcher.matches_for_term('stadium', :limit => 5)
- assert_equal 4, results.size
+ assert_equal 5, results.size
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.