diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 15:07:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 15:07:33 +0300 |
commit | 784fae4b9d7e92350075df2a43d06893080ed1e6 (patch) | |
tree | c7a6fd444acd6897622b233b250a34fd176f01da /spec/lib/gitlab/graphql/authorize | |
parent | fc53ce8e6ca67bf217470179a1ea6cf139bcffad (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/graphql/authorize')
-rw-r--r-- | spec/lib/gitlab/graphql/authorize/authorize_field_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/spec/lib/gitlab/graphql/authorize/authorize_field_service_spec.rb b/spec/lib/gitlab/graphql/authorize/authorize_field_service_spec.rb index aada9285b31..98659dbed57 100644 --- a/spec/lib/gitlab/graphql/authorize/authorize_field_service_spec.rb +++ b/spec/lib/gitlab/graphql/authorize/authorize_field_service_spec.rb @@ -25,6 +25,7 @@ describe Gitlab::Graphql::Authorize::AuthorizeFieldService do end let(:current_user) { double(:current_user) } + subject(:service) { described_class.new(field) } describe '#authorized_resolve' do @@ -34,6 +35,7 @@ describe Gitlab::Graphql::Authorize::AuthorizeFieldService do let(:schema) { GraphQL::Schema.define(query: query_type, mutation: nil)} let(:query_context) { OpenStruct.new(schema: schema) } let(:context) { GraphQL::Query::Context.new(query: OpenStruct.new(schema: schema, context: query_context), values: { current_user: current_user }, object: nil) } + subject(:resolved) { service.authorized_resolve.call(presented_type, {}, context) } context 'scalar types' do diff --git a/spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb b/spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb index 8f02b979598..67cb064b966 100644 --- a/spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb +++ b/spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb @@ -27,6 +27,7 @@ describe Gitlab::Graphql::Authorize::AuthorizeResource do let(:user) { build(:user) } let(:project) { build(:project) } + subject(:loading_resource) { fake_class.new(user, project) } context 'when the user is allowed to perform the action' do |