Sha256: 5c1ccbfc8d958993b044518aa326718317a81364d53befe0b23d5527e3172efa

Contents?: true

Size: 534 Bytes

Versions: 54

Compression:

Stored size: 534 Bytes

Contents

require 'test_plugin_helper'

module Api
  module V2
    class HostsControllerTest < ActionController::TestCase
      test "should get policies enc" do
        policy = FactoryBot.create(:policy)
        host = FactoryBot.create(:compliance_host, :policies => [policy])

        get :policies_enc, :params => { :id => host.id }, :session => set_session_user
        assert_response :success
        response = ActiveSupport::JSON.decode(@response.body)
        assert_equal policy.id, response.first['id']
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
foreman_openscap-10.1.0 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-10.0.3 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-10.0.2 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-10.0.1 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-10.0.0 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-9.0.4 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-9.0.3 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-9.0.2 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-9.0.1 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-9.0.0 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-8.0.0 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-7.1.1 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-7.1.0 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-7.0.0 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-6.0.0 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-5.2.3 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-5.2.2 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-5.1.1 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-5.2.1 test/functional/api/v2/hosts_controller_test.rb
foreman_openscap-5.2.0 test/functional/api/v2/hosts_controller_test.rb