Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2019-09-04 20:42:48 +0300
committerMayra Cabrera <mcabrera@gitlab.com>2019-09-04 20:42:48 +0300
commitaa7b1cfc5b3319373a4b56c755b1fc1d4cbaff02 (patch)
treeba078b30d36bf8ed8d5ec8fece71871e40d85a2c /spec/lib/gitlab/graphql/authorize
parent29e3a08b8f8f9511dd6e25566bc9abb135a597c4 (diff)
Upgrade GraphQL gem to 1.8.17
- Due to https://github.com/exAspArk/batch-loader/pull/32, we changed BatchLoader.for into BatchLoader::GraphQL.for - since our results are wrapped in a BatchLoader::GraphQL, calling `sync` during authorization is required to get real object - `graphql` now has it's own authorization system. Our `authorized?` method conflicted and required renaming
Diffstat (limited to 'spec/lib/gitlab/graphql/authorize')
-rw-r--r--spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb b/spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb
index 50138d272c4..23762666ba8 100644
--- a/spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb
+++ b/spec/lib/gitlab/graphql/authorize/authorize_resource_spec.rb
@@ -46,9 +46,9 @@ describe Gitlab::Graphql::Authorize::AuthorizeResource do
end
end
- describe '#authorized?' do
+ describe '#authorized_resource?' do
it 'is true' do
- expect(loading_resource.authorized?(project)).to be(true)
+ expect(loading_resource.authorized_resource?(project)).to be(true)
end
end
end
@@ -72,9 +72,9 @@ describe Gitlab::Graphql::Authorize::AuthorizeResource do
end
end
- describe '#authorized?' do
+ describe '#authorized_resource?' do
it 'is false' do
- expect(loading_resource.authorized?(project)).to be(false)
+ expect(loading_resource.authorized_resource?(project)).to be(false)
end
end
end
@@ -121,9 +121,9 @@ describe Gitlab::Graphql::Authorize::AuthorizeResource do
end
end
- describe '#authorized?' do
+ describe '#authorized_resource?' do
it 'raises a comprehensive error message' do
- expect { loading_resource.authorized?(project) }.to raise_error(error)
+ expect { loading_resource.authorized_resource?(project) }.to raise_error(error)
end
end
end