diff --git a/t/Asset/dispatch.t b/t/Asset/dispatch.t index 0fc8da650..0b5c77f74 100644 --- a/t/Asset/dispatch.t +++ b/t/Asset/dispatch.t @@ -121,12 +121,12 @@ isnt( $output, "www_view", "?func= dispatch cancelled because of unhandled fragm $td->cut(); $output = $td->dispatch(); is $output, undef, 'dispatch returns undef when trying to access an asset that is not published, and admin is not on'; -$session->switchAdminOn; +$session->user({ userId => 3 }); $output = $td->dispatch(); is $output, 'www_view', 'when admin is on, the asset can be accessed'; $td->publish(); -$session->switchAdminOff; +$session->user({ userId => 1 }); $output = $td->dispatch(); is $output, 'www_view', 'asset state restored for next tests';