Sha256: e1c5dd28154d9b7140fbcb95abb9f1bf5e8654b3b1fe90b733ee7aaea50863de

Contents?: true

Size: 716 Bytes

Versions: 69

Compression:

Stored size: 716 Bytes

Contents

require 'test_helper'

module Queries
  class JobInvocationQueryTest < GraphQLQueryTestCase
    let(:query) do
      <<-GRAPHQL
      query (
        $id: String!
      ) {
        jobInvocation(id: $id) {
          id
          jobCategory
        }
      }
      GRAPHQL
    end

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

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

    test 'fetching job invocation attributes' do
      assert_empty result['errors']

      assert_equal global_id, data['id']
      assert_equal job_invocation.job_category, data['jobCategory']
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

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