Sha256: 800d878746c765a04c594e9abaae283574752772e1bc015821047630701834cd

Contents?: true

Size: 813 Bytes

Versions: 12

Compression:

Stored size: 813 Bytes

Contents

require 'test_helper'

class Kaui::AccountChildrenControllerTest < Kaui::FunctionalTestHelper

  test 'should get index' do
    get :index, :account_id => @account.account_id
    assert_response :success
  end

  test 'should list account children' do
    children_size = 3
    # create children
    for i in 1..children_size
      create_account(@tenant,USERNAME,PASSWORD,"Kaui test#{i}",nil,nil,@account.account_id)
    end

    parameters = {
        :search => { :value => @account.account_id},
        :format => :json,
        :account_id => @account.account_id
    }
    get :pagination, parameters
    assert_response :success

    body = MultiJson.decode(@response.body)

    assert_instance_of Array, body['data']
    assert_equal children_size, body['data'].size
    assert_nil body['error']
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
kaui-2.1.0 test/functional/kaui/account_children_controller_test.rb
kaui-2.0.4 test/functional/kaui/account_children_controller_test.rb
kaui-2.0.3 test/functional/kaui/account_children_controller_test.rb
kaui-2.0.2 test/functional/kaui/account_children_controller_test.rb
kaui-2.0.1 test/functional/kaui/account_children_controller_test.rb
kaui-2.0.0 test/functional/kaui/account_children_controller_test.rb
kaui-1.4.1 test/functional/kaui/account_children_controller_test.rb
kaui-1.4.0 test/functional/kaui/account_children_controller_test.rb
kaui-1.3.0 test/functional/kaui/account_children_controller_test.rb
kaui-1.2.0 test/functional/kaui/account_children_controller_test.rb
kaui-1.1.0 test/functional/kaui/account_children_controller_test.rb
kaui-1.0.0 test/functional/kaui/account_children_controller_test.rb