mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-20 13:49:39 +02:00
26 lines
609 B
Ruby
26 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
|