From dc437d704419b94da036ed4ecf1f9cc1cb7e4c17 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Thu, 27 Jun 2019 20:21:43 -0300 Subject: [PATCH] Fixing a project Test The test was to make sure it would return a error on No token, but it was providing a token. More than that, it were a simple and direct check if it were throwing an error. Now it is checking for the specific Missing Access Token error message. --- tests/projectTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/projectTest.php b/tests/projectTest.php index cdb500e..e788585 100644 --- a/tests/projectTest.php +++ b/tests/projectTest.php @@ -8,10 +8,11 @@ final class ProjectTest extends TestCase { public function testNoTokenShouldThrowError() { - $api = new Memsource('fakeToken'); - $this->expectException(\Exception::class); + $api = new Memsource(); + $this->expectExceptionMessage('Missing Access Token'); $api->project()->list(); } + public function testInvalidProjectUidShouldThrowError() { $api = new Memsource('fakeToken');