From abaa56b1faec4a0c5e19a21028414fd3a072cac3 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Wed, 25 Aug 2021 20:58:28 -0300 Subject: Fix response tests --- t/40-response.t | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 't/40-response.t') diff --git a/t/40-response.t b/t/40-response.t index c401378..a45594a 100644 --- a/t/40-response.t +++ b/t/40-response.t @@ -1,8 +1,10 @@ use lib 'lib'; use Test; use JSON::Fast; -use Matrix::Response; -plan 2; +plan 3; + +use-ok 'Matrix::Client::Response'; +use Matrix::Client::Response; subtest 'Sync', { plan 7; @@ -11,10 +13,10 @@ subtest 'Sync', { if $test-file.IO.f { $data = from-json($test-file.IO.slurp); - lives-ok { Matrix::Response::Sync.new($test-file.IO.slurp) }, 'Sync.new accepts Str'; - lives-ok { Matrix::Response::Sync.new($data) }, 'Sync.new accepts Associative'; + lives-ok { Matrix::Client::Response::Sync.new($test-file.IO.slurp) }, 'Sync.new accepts Str'; + lives-ok { Matrix::Client::Response::Sync.new($data) }, 'Sync.new accepts Associative'; - my $res = Matrix::Response::Sync.new($data); + my $res = Matrix::Client::Response::Sync.new($data); can-ok $res, 'joined-rooms', 'can .joined-rooms'; can-ok $res, 'presence', 'can .presence'; @@ -30,9 +32,9 @@ subtest 'Sync', { subtest 'MediaStore', { plan 4; my %config = 'm.upload.size' => 5000; - my $config-response = Matrix::Response::MediaStore::Config.new(%config); + my $config-response = Matrix::Client::Response::MediaStore::Config.new(%config); - isa-ok $config-response, Matrix::Response::MediaStore::Config; + isa-ok $config-response, Matrix::Client::Response::MediaStore::Config; can-ok $config-response, 'upload-size'; isa-ok $config-response.upload-size, Int; is $config-response.upload-size, %config, 'correct upload size'; -- cgit v1.2.3-54-g00ecf