Sha256: 48ba3a66495c3031d8302b4ee0af39577f2214b4c39a05d308ba2ae9ca4bcc38
Contents?: true
Size: 706 Bytes
Versions: 43
Compression:
Stored size: 706 Bytes
Contents
require 'foreman_tasks_test_helper' module Queries class TaskQueryTest < GraphQLQueryTestCase let(:query) do <<-GRAPHQL query ( $id: String! ) { task(id: $id) { id action result } } GRAPHQL end let(:res) { 'inconclusive' } let(:task) { FactoryBot.create(:some_task, :result => res) } let(:global_id) { Foreman::GlobalId.for(task) } let(:variables) { { id: global_id } } let(:data) { result['data']['task'] } test 'should fetch task data' do assert_empty result['errors'] assert_equal global_id, data['id'] assert_equal task.result, data['result'] end end end
Version data entries
43 entries across 43 versions & 1 rubygems