Sha256: aa736f1b324ed874f1dcc87d8782640fb4d4e0aec9d3c41ffb8497e29df23c3c

Contents?: true

Size: 1005 Bytes

Versions: 2

Compression:

Stored size: 1005 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Osso::GraphQL::Schema do
  describe 'EnterpriseAccounts' do
    describe 'for an admin user' do
      let(:current_scope) { :admin }

      it 'returns Enterprise Accounts' do
        create_list(:enterprise_account, 2)

        query = <<~GRAPHQL
          query EnterpriseAccounts {
            enterpriseAccounts {
              domain
              id
              identityProviders {
                id
                service
                domain
                acsUrl
                ssoCert
                ssoUrl
                configured
              }
              name
              status
            }
          }
        GRAPHQL

        response = described_class.execute(
          query,
          variables: nil,
          context: { scope: current_scope },
        )

        expect(response['errors']).to be_nil
        expect(response.dig('data', 'enterpriseAccounts').count).to eq(2)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
osso-0.0.3.7 spec/graphql/query/enterprise_accounts_spec.rb
osso-0.0.3.6 spec/graphql/query/enterprise_accounts_spec.rb