mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-20 13:49:39 +02:00
* Remove stale 1.0 import logic and model * Fresh start * Checkpoint before removing nav * First working prototype * Add trade, account, and mint import flows * Basic working version with tests * System tests for each import type * Clean up mappings flow * Clean up PR, refactor stale code, tests * Add back row validations * Row validations * Fix import job test * Fix import navigation * Fix mint import configuration form * Currency preset for new accounts
25 lines
609 B
Ruby
25 lines
609 B
Ruby
require "test_helper"
|
|
|
|
class Import::CleansControllerTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
sign_in @user = users(:family_admin)
|
|
end
|
|
|
|
test "shows if configured" do
|
|
import = imports(:transaction)
|
|
|
|
TransactionImport.any_instance.stubs(:configured?).returns(true)
|
|
|
|
get import_clean_path(import)
|
|
assert_response :success
|
|
end
|
|
|
|
test "redirects if not configured" do
|
|
import = imports(:transaction)
|
|
|
|
TransactionImport.any_instance.stubs(:configured?).returns(false)
|
|
|
|
get import_clean_path(import)
|
|
assert_redirected_to import_configuration_path(import)
|
|
end
|
|
end
|