]> Dogcows Code - chaz/graphql-client/blobdiff - t/client.t
Release GraphQL-Client 0.605
[chaz/graphql-client] / t / client.t
index 4775b70036f8c44cc12b10285b9f3bb6a15184b3..841bd8c5f68d5bbb3660a619536370b4d6c082d7 100755 (executable)
@@ -14,14 +14,14 @@ use GraphQL::Client;
 use MockTransport;
 
 subtest 'transport' => sub {
-    my $client = GraphQL::Client->new(class => 'http');
-    isa_ok($client->transport, 'GraphQL::Client::http', 'decide transport from class');
+    my $client = GraphQL::Client->new(transport_class => 'http');
+    isa_ok($client->transport, 'GraphQL::Client::http', 'decide transport from transport_class');
 
     $client = GraphQL::Client->new(url => 'https://localhost:4000/graphql');
     isa_ok($client->transport, 'GraphQL::Client::http', 'decide transport from url');
 
-    $client = GraphQL::Client->new(class => 'not a real class');
-    is($client->class, 'not a real class', 'class constructor works');
+    $client = GraphQL::Client->new(transport_class => 'not a real class');
+    is($client->transport_class, 'not a real class', 'transport_class constructor works');
     throws_ok { $client->transport } qr/^Failed to load transport/, 'throws if invalid transport';
 };
 
@@ -60,7 +60,7 @@ subtest 'request to transport' => sub {
     $req = ($mock->requests)[-1];
     is_deeply($req->[1], {
         baz => 'qux',
-    }, 'operation name can be ommitted with transport options');
+    }, 'operation name can be omitted with transport options');
 };
 
 subtest 'success response' => sub {
This page took 0.02264 seconds and 4 git commands to generate.