Sha256: 8e3b7071d6551221f91c471de6c5ef548e33520166160933263a06592059684c
Contents?: true
Size: 703 Bytes
Versions: 58
Compression:
Stored size: 703 Bytes
Contents
require 'test_plugin_helper' module Queries class AnsibleRolesQueryTest < GraphQLQueryTestCase let(:query) do <<-GRAPHQL query { ansibleRoles { totalCount nodes { id name } } } GRAPHQL end let(:data) { result['data']['ansibleRoles'] } setup do FactoryBot.create_list(:ansible_role, 2) end test 'should fetch Ansible roles' do assert_empty result['errors'] expected_count = AnsibleRole.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
58 entries across 58 versions & 1 rubygems