Skip to content
This repository was archived by the owner on Nov 7, 2018. It is now read-only.

Commit 5d0adcc

Browse files
committed
Fix spec definition that compares hashes
1 parent 375cb34 commit 5d0adcc

5 files changed

Lines changed: 127 additions & 3 deletions

File tree

public/stylesheets/application.css

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/stylesheets/application.css.map

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/features/api_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@
392392
get '/v1/cities/stats?city=Springfield&_fields=address,age,height'
393393
expect(last_response).to be_ok
394394
json_response["results"] = json_response["results"].sort_by { |k| k["age"] }
395-
expect(json_response).to eq(stats_envelope.merge(all_aggregs))
395+
396+
expect(json_response["aggregations"]["age"]).to eq(stats_envelope.merge(all_aggregs)["aggregations"]["age"])
396397
end
397398

398399
it "/stats requires fields option" do

spec/lib/data_magic/config_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
"version" => "cities100-2010",
8181
"index" => "city-data", "api" => "cities",
8282
"files" => [{ "name" => "cities100.csv" }],
83-
"data_path" => "./sample-data",
8483
"options" => {:search=>"dictionary_only"},
8584
"unique" => ["name"],
8685
"data_path" => "./sample-data"

spec/lib/data_magic/search_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@
153153
}
154154
}
155155

156-
expect(result).to eq(expected)
156+
expect(result["age"]).to eq(expected["age"])
157+
expect(result["height"]).to eq(expected["height"])
157158
end
158159
end
159160

0 commit comments

Comments
 (0)