Testing Exchange Rate Provider Missing Controller Integration in maybe-finance
This test suite validates the exchange rate provider missing functionality in the Maybe Finance application. It focuses on testing the controller actions for handling missing exchange rate provider issues and verifies the proper enqueuing of sync jobs after updates.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
maybe-finance/maybe
test/controllers/issue/exchange_rate_provider_missings_controller_test.rb
require "test_helper"
class Issue::ExchangeRateProviderMissingsControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in users(:family_admin)
@issue = issues(:one)
end
test "should update issue" do
patch issue_exchange_rate_provider_missing_url(@issue), params: {
issue_exchange_rate_provider_missing: {
synth_api_key: "1234"
}
}
assert_enqueued_with job: SyncJob
assert_redirected_to @issue.issuable
end
end