Sha256: 1f023af09aaf1113fdfcb41d9e90dab50dfb4082792f851ea478991f5ca51119

Contents?: true

Size: 722 Bytes

Versions: 68

Compression:

Stored size: 722 Bytes

Contents

require 'test_plugin_helper'

module Queries
  class JobInvocationsQueryTest < GraphQLQueryTestCase
    let(:query) do
      <<-GRAPHQL
      query {
        jobInvocations {
          totalCount
          nodes {
            id
            jobCategory
          }
        }
      }
      GRAPHQL
    end

    let(:data) { result['data']['jobInvocations'] }

    setup do
      FactoryBot.create_list(:job_invocation, 2)
    end

    test 'should fetch job invocations' do
      assert_empty result['errors']

      expected_count = JobInvocation.count

      assert_not_equal 0, expected_count
      assert_equal expected_count, data['totalCount']
      assert_equal expected_count, data['nodes'].count
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
foreman_remote_execution-14.1.1 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-14.0.2 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-14.0.1 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-13.2.6 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-14.0.0 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-13.2.5 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-13.2.4 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-13.2.3 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-13.2.2 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-12.0.7 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-13.2.1 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-13.2.0 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-10.1.3 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-13.0.0 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-12.0.5 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-12.0.4 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-12.0.1 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-12.0.2 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-11.1.3 test/graphql/queries/job_invocations_query_test.rb
foreman_remote_execution-10.1.2 test/graphql/queries/job_invocations_query_test.rb