Skip to content

Commit

Permalink
test: allow additional param for prefetch
Browse files Browse the repository at this point in the history
  • Loading branch information
jimlin-sfgov committed Jan 8, 2025
1 parent d818c17 commit fadafaa
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spec/javascripts/fixtures/json/listings-api-ami.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ami":[{"percent":"50","values":[{"year":2016.0,"percent":50.0,"numOfHousehold":1.0,"chartType":"Non-HERA","amount":43050.0},{"year":2016.0,"percent":50.0,"numOfHousehold":2.0,"chartType":"Non-HERA","amount":49200.0},{"year":2016.0,"percent":50.0,"numOfHousehold":3.0,"chartType":"Non-HERA","amount":55350.0},{"year":2016.0,"percent":50.0,"numOfHousehold":4.0,"chartType":"Non-HERA","amount":61500.0},{"year":2016.0,"percent":50.0,"numOfHousehold":5.0,"chartType":"Non-HERA","amount":61500.0},{"year":2016.0,"percent":50.0,"numOfHousehold":6.0,"chartType":"Non-HERA","amount":66450.0},{"year":2016.0,"percent":50.0,"numOfHousehold":7.0,"chartType":"Non-HERA","amount":71350.0},{"year":2016.0,"percent":50.0,"numOfHousehold":8.0,"chartType":"Non-HERA","amount":76300.0}]},{"percent":"50","values":[{"year":2016.0,"percent":50.0,"numOfHousehold":1.0,"chartType":"HCD/TCAC","amount":43050.0},{"year":2016.0,"percent":50.0,"numOfHousehold":2.0,"chartType":"HCD/TCAC","amount":49200.0},{"year":2016.0,"percent":50.0,"numOfHousehold":3.0,"chartType":"HCD/TCAC","amount":55350.0},{"year":2016.0,"percent":50.0,"numOfHousehold":4.0,"chartType":"HCD/TCAC","amount":61500.0},{"year":2016.0,"percent":50.0,"numOfHousehold":5.0,"chartType":"HCD/TCAC","amount":66450.0},{"year":2016.0,"percent":50.0,"numOfHousehold":6.0,"chartType":"HCD/TCAC","amount":71350.0},{"year":2016.0,"percent":50.0,"numOfHousehold":7.0,"chartType":"HCD/TCAC","amount":76300.0},{"year":2016.0,"percent":50.0,"numOfHousehold":8.0,"chartType":"HCD/TCAC","amount":81200.0}]},{"percent":"60","values":[{"year":2016.0,"percent":60.0,"numOfHousehold":1.0,"chartType":"Non-HERA","amount":51660.0},{"year":2016.0,"percent":60.0,"numOfHousehold":2.0,"chartType":"Non-HERA","amount":59040.0},{"year":2016.0,"percent":60.0,"numOfHousehold":3.0,"chartType":"Non-HERA","amount":66420.0},{"year":2016.0,"percent":60.0,"numOfHousehold":4.0,"chartType":"Non-HERA","amount":73800.0},{"year":2016.0,"percent":60.0,"numOfHousehold":5.0,"chartType":"Non-HERA","amount":73800.0},{"year":2016.0,"percent":60.0,"numOfHousehold":6.0,"chartType":"Non-HERA","amount":79740.0},{"year":2016.0,"percent":60.0,"numOfHousehold":7.0,"chartType":"Non-HERA","amount":85620.0},{"year":2016.0,"percent":60.0,"numOfHousehold":8.0,"chartType":"Non-HERA","amount":91560.0}]}]}
{"ami":[{"percent":"50","values":[]},{"percent":"50","values":[]},{"percent":"60","values":[]}]}

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion spec/javascripts/fixtures/json/listings-api-index.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion spec/javascripts/fixtures/json/listings-api-show.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"First Republic Bank":[{"Id":"003U000001Wnp5gIAB","FirstName":"Hilary","LastName":"Byrde","Status":"Active","Lending_Agent_Inactive_Date":null}],"Homestreet Bank":[{"Id":"0030P00002CBHPrQAP","FirstName":"Jason","LastName":"Lockhart III","Status":"Inactive","Lending_Agent_Inactive_Date":"2018-06-01"}]}
{"Pierce Ltd":[{"Id":"0034U00002R08TwQAJ","FirstName":"Wendy","LastName":"Testing","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0034U00002b6WX8QAM","FirstName":"Aaron","LastName":"White","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0034U00002j7kMiQAI","FirstName":"Karen","LastName":"Young","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0034U00002j7kNbQAI","FirstName":"Kelli","LastName":"Kline","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P0000292unOQAQ","FirstName":"Brandon","LastName":"Harris","Status":"Active","Lending_Agent_Inactive_Date":null}],"Lewis-Wolf":[{"Id":"0030P00002IByU1QAL","FirstName":"Michelle","LastName":"Bell","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002L0AnwQAF","FirstName":"Robert","LastName":"Flores","Status":"Active","Lending_Agent_Inactive_Date":null}],"Brown-Ortiz":[{"Id":"0030P00002O3hdeQAB","FirstName":"Maria","LastName":"Kelly","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002MlWbGQAV","FirstName":"Angela","LastName":"Frazier","Status":"Active","Lending_Agent_Inactive_Date":null}],"Campbell Ltd":[{"Id":"0034U00002XRPX4QAP","FirstName":"John","LastName":"Carroll","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00001zhLEvQAM","FirstName":"Deborah","LastName":"Webb","Status":"Active","Lending_Agent_Inactive_Date":null}],"Smith-Schwartz":[{"Id":"0030P000027uLE1QAM","FirstName":"Patricia","LastName":"Davis","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002LA5KzQAL","FirstName":"William","LastName":"Olson","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002LA5KaQAL","FirstName":"Kenneth","LastName":"Francis","Status":"Active","Lending_Agent_Inactive_Date":null}],"Robertson and Sons":[{"Id":"0030P00002LBB17QAH","FirstName":"Arthur","LastName":"Floyd","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002LBB1gQAH","FirstName":"Debra","LastName":"Mcgrath","Status":"Active","Lending_Agent_Inactive_Date":null}],"Pacheco, Garcia and Miller":[{"Id":"0030P00002LBB2kQAH","FirstName":"Robert","LastName":"Burton","Status":"Active","Lending_Agent_Inactive_Date":null}],"Brooks, English and Hendricks":[{"Id":"003U000001WpAnEIAV","FirstName":"Jeffrey","LastName":"Beard","Status":"Active","Lending_Agent_Inactive_Date":null}],"Roman-Robinson":[{"Id":"003U000001p3AjVIAU","FirstName":"David","LastName":"Bryant","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002ME0yyQAD","FirstName":"Ryan","LastName":"Shaw","Status":"Active","Lending_Agent_Inactive_Date":null}],"Morales LLC":[{"Id":"0034U00002j7LjxQAE","FirstName":"Jonathan","LastName":"Coleman","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"003U000001m0RRyIAM","FirstName":"Michael","LastName":"Thomas","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002BVDfJQAX","FirstName":"Michelle","LastName":"Ramirez","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"003U000001Wnp8zIAB","FirstName":"Joseph","LastName":"Cobb","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"003U000001Wnp5gIAB","FirstName":"Alexandria","LastName":"Logan","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002LA5HvQAL","FirstName":"Richard","LastName":"Anderson","Status":"Active","Lending_Agent_Inactive_Date":null}],"Lucas and Sons":[{"Id":"0034U00002VYcJOQA1","FirstName":"Brent","LastName":"Martinez","Status":"Active","Lending_Agent_Inactive_Date":null}],"Rhodes, Jackson and Nelson":[{"Id":"0034U00002XRIIPQA5","FirstName":"Kathy","LastName":"Woodward","Status":"Active","Lending_Agent_Inactive_Date":null}],"Hutchinson-Torres":[{"Id":"0034U00002d1tTVQAY","FirstName":"Jill","LastName":"Griffith","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"003U000001poFw8IAE","FirstName":"Alexis","LastName":"Black","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002LA5OMQA1","FirstName":"Anthony","LastName":"Rodriguez","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"003U000001pqHGDIA2","FirstName":"Charles","LastName":"Mckenzie","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0030P00002Oro9JQAR","FirstName":"Diane","LastName":"Juarez","Status":"Active","Lending_Agent_Inactive_Date":null}],"Pitts Inc":[{"Id":"0030P00002S6RMCQA3","FirstName":"Amanda","LastName":"Mata","Status":"Active","Lending_Agent_Inactive_Date":null}],"Gonzalez, Anderson and Bennett":[{"Id":"0034U00002XRCtpQAH","FirstName":"Taylor","LastName":"Contreras","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0034U00002XRCvCQAX","FirstName":"Sarah","LastName":"Fitzgerald","Status":"Active","Lending_Agent_Inactive_Date":null}],"Martin-Kerr":[{"Id":"0030P000029dwYgQAI","FirstName":"Ryan","LastName":"Wallace","Status":"Active","Lending_Agent_Inactive_Date":null}],"Swanson Group":[{"Id":"0030P00002LA514QAD","FirstName":"Michael","LastName":"Thompson","Status":"Active","Lending_Agent_Inactive_Date":null}],"Buck, Bailey and Collins":[{"Id":"0030P00002LA5BdQAL","FirstName":"Richard","LastName":"Floyd","Status":"Active","Lending_Agent_Inactive_Date":null},{"Id":"0034U00002Vb5rtQAB","FirstName":"Ann","LastName":"Campos","Status":null,"Lending_Agent_Inactive_Date":null},{"Id":"0030P00002LA5DUQA1","FirstName":"Samantha","LastName":"Floyd","Status":"Active","Lending_Agent_Inactive_Date":null}],"Banks-Johnson":[{"Id":"0030P00002LA5TMQA1","FirstName":"Cory","LastName":"Bryant","Status":"Active","Lending_Agent_Inactive_Date":null}],"Poole LLC":[{"Id":"0030P00002LA5b6QAD","FirstName":"Leslie","LastName":"Grant","Status":"Active","Lending_Agent_Inactive_Date":null}]}
2 changes: 1 addition & 1 deletion spec/services/cache_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# expects `prefetch_args` to be a hash of options passed to `prefetch_listings`
it 'refreshes the listing cache for updated listing' do
expect(Force::ListingService).to receive(:listing)
.with(updated_listing_id, force: true)
.with(updated_listing_id, hash_including(force: true))
expect(Force::ListingService).to receive(:units)
.with(updated_listing_id, force: true)
expect(Force::ListingService).to receive(:preferences)
Expand Down
37 changes: 37 additions & 0 deletions spec/vcr/gis/invalid.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions spec/vcr/listings/eligibility/rental.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fadafaa

Please sign in to comment.