# frozen_string_literal: true require 'test_plugin_helper' class SccAccountsControllerTest2 < ActionDispatch::IntegrationTest setup do @scc_account = scc_accounts(:one) end test 'should get index' do get scc_accounts_url, session: set_session_user # post path, params: { :id => "#{taxonomies(:empty_organization).id}-#{taxonomies(:empty_organization).name}" } # post path, params: {:toState => scc_accounts_url, :bastion_page => "select_organization"} # follow_redirect! assert_response :success end test 'should get new' do get new_scc_account_url assert_response :success end test 'should create scc_account' do assert_difference('SccAccount.count') do post scc_accounts_url, params: { scc_account: {} } end assert_redirected_to scc_account_url(SccAccount.last) end test 'should show scc_account' do get scc_account_url(@scc_account) assert_response :success end test 'should get edit' do get edit_scc_account_url(@scc_account) assert_response :success end test 'should update scc_account' do patch scc_account_url(@scc_account), params: { scc_account: {} } assert_redirected_to scc_account_url(@scc_account) end test 'should destroy scc_account' do assert_difference('SccAccount.count', -1) do delete scc_account_url(@scc_account) end assert_redirected_to scc_accounts_url end end