~bestpractical/rt/master

« back to all changes in this revision

Viewing changes to t/rest2/assets.t

  • Committer: sunnavy
  • Date: 2023-10-19 19:45:11 UTC
  • mfrom: (8471.1.577)
  • Revision ID: git-v1:9fca83d11d15fb8034308194b9c9052d5df7d454
Merge branch '5.0-trunk'

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
        local $TODO = "RT ->Update isn't introspectable";
173
173
        is($res->code, 403);
174
174
    };
175
 
    is_deeply($mech->json_response, ['Asset Asset creation using REST: Permission Denied', 'Asset Asset creation using REST: Permission Denied']);
 
175
    is_deeply($mech->json_response, ['Asset 1: Permission Denied', 'Asset 1: Permission Denied']);
176
176
 
177
177
    $user->PrincipalObj->GrantRight( Right => 'ModifyAsset' );
178
178
 
181
181
        'Authorization' => $auth,
182
182
    );
183
183
    is($res->code, 200);
184
 
    is_deeply($mech->json_response, ["Asset Asset update using REST: Name changed from 'Asset creation using REST' to 'Asset update using REST'", "Asset Asset update using REST: Status changed from 'new' to 'allocated'"]);
 
184
    is_deeply($mech->json_response, ["Asset 1: Name changed from 'Asset creation using REST' to 'Asset update using REST'", "Asset 1: Status changed from 'new' to 'allocated'"]);
185
185
 
186
186
    $res = $mech->get($asset_url,
187
187
        'Authorization' => $auth,
256
256
    is($content->{count}, 3);
257
257
    is($content->{page}, 1);
258
258
    is($content->{per_page}, 20);
259
 
    is($content->{total}, 3);
 
259
    is($content->{total}, undef, 'No total');
260
260
    is(scalar @{$content->{items}}, 3);
261
261
 
262
262
    for my $txn (@{ $content->{items} }) {