Skip to content

Instantly share code, notes, and snippets.

@johnkeith
Created March 18, 2015 15:18
Show Gist options
  • Select an option

  • Save johnkeith/d1f0b1d1be168a3db9eb to your computer and use it in GitHub Desktop.

Select an option

Save johnkeith/d1f0b1d1be168a3db9eb to your computer and use it in GitHub Desktop.
context "get loan_strats for all securitizations", test_all_securitizations: true do
let(:relevant_securitizations) do
DimSecuritization.all.pluck(:dwidSecuritization) - ElasticsearchExclude.all.pluck(:id)
end
it 'visits the page and renders the template for all securitizations' do
log_and_print "Testing all #{relevant_securitizations.length} key securitizations"
relevant_securitizations.each do |dwid|
log_and_print "Testing Loan Strats controller action for securitization #{dwid}"
the_request = get 'loan_strats', format: :html, dwidSecuritization: dwid
expect(response).to be_ok
expect(response).to render_template(:loan_strats)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment