Revision f0a91d3f
Added by Timo Goebel about 5 years ago
test/graphql/queries/host_query_test.rb | ||
---|---|---|
assert_collection host.fact_names, data['factNames']
|
||
assert_collection host.fact_values, data['factValues']
|
||
end
|
||
|
||
context 'with user without view_models permission' do
|
||
let(:context_user) { setup_user 'view', 'hosts' }
|
||
|
||
test 'does not load associated model' do
|
||
assert_empty result['errors']
|
||
|
||
assert_nil data['model']
|
||
end
|
||
end
|
||
|
||
context 'with user without view_hosts permission' do
|
||
let(:context_user) { setup_user 'view', 'models' }
|
||
|
||
test 'does not load any hosts' do
|
||
assert_empty result['errors']
|
||
|
||
assert_nil data
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
fixes #26495 - graphql: properly auth resources