Project

General

Profile

« Previous | Next » 

Revision 305ee6f0

Added by Timo Goebel about 5 years ago

fixes #26528 - graphql: refactor AuthorizedModelQuery to resolver

View differences:

test/graphql/queries/fact_values_query_test.rb
require 'test_helper'
class Queries::FactValuesQueryTest < GraphQLQueryTestCase
let(:query) do
<<-GRAPHQL
module Queries
class FactValuesQueryTest < GraphQLQueryTestCase
let(:query) do
<<-GRAPHQL
query {
factValues {
totalCount
......
}
}
}
GRAPHQL
end
GRAPHQL
end
let(:data) { result['data']['factValues'] }
let(:data) { result['data']['factValues'] }
setup do
FactoryBot.create_list(:fact_value, 2)
end
setup do
FactoryBot.create_list(:fact_value, 2)
end
test 'fetching fact values attributes' do
assert_empty result['errors']
test 'fetching fact values attributes' do
assert_empty result['errors']
expected_count = FactValue.count
expected_count = FactValue.count
assert_not_equal 0, expected_count
assert_equal expected_count, data['totalCount']
assert_equal expected_count, data['edges'].count
assert_not_equal 0, expected_count
assert_equal expected_count, data['totalCount']
assert_equal expected_count, data['edges'].count
end
end
end

Also available in: Unified diff