Project

General

Profile

« Previous | Next » 

Revision f0a91d3f

Added by Timo Goebel about 5 years ago

fixes #26495 - graphql: properly auth resources

View differences:

test/test_helper.rb
class GraphQLQueryTestCase < ActiveSupport::TestCase
let(:variables) { {} }
let(:context) {{ current_user: FactoryBot.create(:user, :admin) }}
let(:context_user) { FactoryBot.create(:user, :admin) }
let(:context) {{ current_user: context_user }}
let(:result) { ForemanGraphqlSchema.execute(query, variables: variables, context: context) }
def assert_record(expected, actual, type_name: nil)

Also available in: Unified diff