Sha256: 32fcc0f6482a3fb01cd59777b13d2204e3274afc110f2746c433ca697ccd9b6d

Contents?: true

Size: 681 Bytes

Versions: 11

Compression:

Stored size: 681 Bytes

Contents

require 'test_plugin_helper'

module Queries
  class OvalContentQueryTest < GraphQLQueryTestCase
    let(:query) do
      <<-GRAPHQL
        query($id:String!) {
          ovalContent(id: $id) {
            id
            name
            originalFilename
            url
          }
        }
      GRAPHQL
    end

    let(:oval_content) { FactoryBot.create(:oval_content) }

    let(:global_id) { Foreman::GlobalId.for(oval_content) }
    let(:variables) { { id: global_id } }
    let(:data) { result['data']['ovalContent'] }

    test 'should return OVAL Content' do
      assert_equal global_id, data['id']
      assert_equal oval_content.name, data['name']
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman_openscap-8.0.0 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-7.1.1 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-7.1.0 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-7.0.0 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-6.0.0 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-5.2.3 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-5.2.2 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-5.1.1 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-5.2.1 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-5.2.0 test/graphql/queries/oval_content_query_test.rb
foreman_openscap-5.1.0 test/graphql/queries/oval_content_query_test.rb