X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fgraphql-client;a=blobdiff_plain;f=t%2Fclient.t;h=841bd8c5f68d5bbb3660a619536370b4d6c082d7;hp=4775b70036f8c44cc12b10285b9f3bb6a15184b3;hb=HEAD;hpb=6ceb671d38a8564d8bbe6e52a33e54ebdc4ca282 diff --git a/t/client.t b/t/client.t index 4775b70..841bd8c 100755 --- a/t/client.t +++ b/t/client.t @@ -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 {