diff options
author | Matias Linares <matiaslina@gmail.com> | 2021-08-25 20:58:28 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2021-08-25 20:58:28 -0300 |
commit | abaa56b1faec4a0c5e19a21028414fd3a072cac3 (patch) | |
tree | 918309db311c1e361e6f9633496dadf51964b142 /t/40-response.t | |
parent | c147edfd47e7d652d80a3e386ba28255e67d4d17 (diff) | |
download | perl6-matrix-client-abaa56b1faec4a0c5e19a21028414fd3a072cac3.tar.gz |
Fix response tests
Diffstat (limited to 't/40-response.t')
-rw-r--r-- | t/40-response.t | 16 |
1 files changed, 9 insertions, 7 deletions
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<m.upload.size>, 'correct upload size'; |