Sha256: fc87145b4e876eb1eafe9a36439c29faf5c16cfda897cb39983084e411aedcab

Contents?: true

Size: 1.36 KB

Versions: 6

Compression:

Stored size: 1.36 KB

Contents

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_scc_manager-1.8.12 test/controllers/scc_accounts_controller_test2.rb
foreman_scc_manager-1.8.10 test/controllers/scc_accounts_controller_test2.rb
foreman_scc_manager-1.8.9 test/controllers/scc_accounts_controller_test2.rb
foreman_scc_manager-1.8.8 test/controllers/scc_accounts_controller_test2.rb
foreman_scc_manager-1.8.7 test/controllers/scc_accounts_controller_test2.rb
foreman_scc_manager-1.8.6 test/controllers/scc_accounts_controller_test2.rb