]> BookStack Code Mirror - bookstack/blobdiff - tests/Api/TestsApi.php
Fixed failing webhook test cases
[bookstack] / tests / Api / TestsApi.php
index 683ca0c747a022a31c829f9ea2359feadf4e6e44..97ca82ea71c914bf5597408f8dd5fc5aec2087b2 100644 (file)
@@ -17,6 +17,16 @@ trait TestsApi
         return $this;
     }
 
+    /**
+     * Set the API admin role as the current user via the API driver.
+     */
+    protected function actingAsApiAdmin()
+    {
+        $this->actingAs($this->getAdmin(), 'api');
+
+        return $this;
+    }
+
     /**
      * Format the given items into a standardised error format.
      */