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:
Diffstat (limited to 'spec/support/matchers')
-rw-r--r--spec/support/matchers/graphql_matchers.rb10
-rw-r--r--spec/support/matchers/markdown_matchers.rb2
-rw-r--r--spec/support/matchers/project_namespace_matcher.rb2
3 files changed, 7 insertions, 7 deletions
diff --git a/spec/support/matchers/graphql_matchers.rb b/spec/support/matchers/graphql_matchers.rb
index dcaec176687..3ba88c3ae71 100644
--- a/spec/support/matchers/graphql_matchers.rb
+++ b/spec/support/matchers/graphql_matchers.rb
@@ -7,14 +7,14 @@ RSpec::Matchers.define :require_graphql_authorizations do |*expected|
if klass.respond_to?(:required_permissions)
klass.required_permissions
else
- [klass.to_graphql.metadata[:authorize]]
+ Array.wrap(klass.authorize)
end
end
match do |klass|
actual = permissions_for(klass)
- expect(actual).to match_array(expected)
+ expect(actual).to match_array(expected.compact)
end
failure_message do |klass|
@@ -213,16 +213,16 @@ RSpec::Matchers.define :have_graphql_resolver do |expected|
match do |field|
case expected
when Method
- expect(field.to_graphql.metadata[:type_class].resolve_proc).to eq(expected)
+ expect(field.type_class.resolve_proc).to eq(expected)
else
- expect(field.to_graphql.metadata[:type_class].resolver).to eq(expected)
+ expect(field.type_class.resolver).to eq(expected)
end
end
end
RSpec::Matchers.define :have_graphql_extension do |expected|
match do |field|
- expect(field.to_graphql.metadata[:type_class].extensions).to include(expected)
+ expect(field.type_class.extensions).to include(expected)
end
end
diff --git a/spec/support/matchers/markdown_matchers.rb b/spec/support/matchers/markdown_matchers.rb
index f01c4075eeb..1932f78506f 100644
--- a/spec/support/matchers/markdown_matchers.rb
+++ b/spec/support/matchers/markdown_matchers.rb
@@ -270,7 +270,7 @@ module MarkdownMatchers
set_default_markdown_messages
match do |actual|
- expect(actual).to have_link(href: 'http://localhost:8000/nomnoml/svg/eNqLDsgsSixJrUmtTHXOL80rsVLwzCupKUrMTNHQtC7IzMlJTE_V0KzhUlCITkpNLEqJ1dWNLkgsKsoviUUSs7KLTssvzVHIzS8tyYjligUAMhEd0g==')
+ expect(actual).to have_link(href: 'http://localhost:8000/nomnoml/svg/eNqLDsgsSixJrUmtTHXOL80rsVLwzCupKUrMTNHQtC7IzMlJTE_V0KzhUlCITkpNLEqJ1dWNLkgsKsoviUUSs7KLTssvzVHIzS8tyYjliuUCAE_tHdw=')
end
end
end
diff --git a/spec/support/matchers/project_namespace_matcher.rb b/spec/support/matchers/project_namespace_matcher.rb
index 95aa5429679..8666a605276 100644
--- a/spec/support/matchers/project_namespace_matcher.rb
+++ b/spec/support/matchers/project_namespace_matcher.rb
@@ -10,7 +10,7 @@ RSpec::Matchers.define :be_in_sync_with_project do |project|
project_namespace.present? &&
project.name == project_namespace.name &&
project.path == project_namespace.path &&
- project.namespace == project_namespace.parent &&
+ project.namespace_id == project_namespace.parent_id &&
project.visibility_level == project_namespace.visibility_level &&
project.shared_runners_enabled == project_namespace.shared_runners_enabled
end