spec/graphql/upgrader/member_spec.rb in graphql-1.8.0 vs spec/graphql/upgrader/member_spec.rb in graphql-1.8.1
- old
+ new
@@ -193,11 +193,11 @@
new = %{field :first_name, String, null: false}
assert_equal new, upgrade(old)
end
describe "resolve proc to method" do
- it "converts @object and @context" do
+ it "converts object and context" do
old = %{
field :firstName, !types.String do
resolve ->(obj, arg, ctx) {
ctx.something
other_ctx # test combined identifiers
@@ -209,15 +209,15 @@
}
new = %{
field :first_name, String, null: false
def first_name
- @context.something
+ context.something
other_ctx # test combined identifiers
- @object[@context] + @object
- @object.given_name
+ object[context] + object
+ object.given_name
end
}
assert_equal new, upgrade(old)
end
@@ -231,10 +231,10 @@
}
new = %{
field :first_name, String, null: false
def first_name
- @object.given_name
+ object.given_name
end
}
assert_equal new, upgrade(old)
end