Sha256: ac664c60a8c78dc5feba53429c4fef15a71d091e499b65cfe760a656a5609fd1

Contents?: true

Size: 612 Bytes

Versions: 6

Compression:

Stored size: 612 Bytes

Contents

require 'test_statistics_helper'

class ForemanStatistics::Api::V2::StatisticsControllerTest < ActionController::TestCase
  setup do
    @routes = ForemanStatistics::Engine.routes
  end

  test 'should get statistics' do
    get :index
    assert_response :success
    response = ActiveSupport::JSON.decode(@response.body)
    assert_not response.empty?
    expected_keys = %w[arch_count cpu_count env_count klass_count
                       mem_free mem_size mem_totfree mem_totsize
                       model_count os_count swap_free swap_size]

    assert_equal expected_keys, response.keys.sort
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
foreman_statistics-2.1.0 test/functional/foreman_statistics/api/v2/statistics_controller_test.rb
foreman_statistics-2.0.1 test/functional/foreman_statistics/api/v2/statistics_controller_test.rb
foreman_statistics-2.0.0 test/functional/foreman_statistics/api/v2/statistics_controller_test.rb
foreman_statistics-1.2.0 test/functional/foreman_statistics/api/v2/statistics_controller_test.rb
foreman_statistics-1.1.1 test/functional/foreman_statistics/api/v2/statistics_controller_test.rb
foreman_statistics-1.1.0 test/functional/foreman_statistics/api/v2/statistics_controller_test.rb