Skip to content

Commit

Permalink
FIX ReadOneExtensionTest now uses a test database since it performs w…
Browse files Browse the repository at this point in the history
…rites
  • Loading branch information
robbieaverill committed Jan 31, 2019
1 parent 151329d commit f9763bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/php/GraphQL/Extensions/ReadOneExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
use SilverStripe\GraphQL\Manager;
use SilverStripe\GraphQL\Scaffolding\Scaffolders\CRUD\ReadOne;
use SilverStripe\GraphQL\Scaffolding\StaticSchema;
use SilverStripe\Security\Member;
use SilverStripe\Security\Security;
use SilverStripe\Versioned\GraphQL\Types\VersionedInputType;
use SilverStripe\Versioned\Tests\GraphQL\Fake\Fake;
use SilverStripe\Versioned\Versioned;

class ReadOneExtensionTest extends SapphireTest
{
protected $usesDatabase = true;

public static $extra_dataobjects = [
Fake::class,
];
Expand All @@ -42,7 +44,7 @@ public function testReadOneExtensionAppliesFilters()
return $readScaffold['resolve'](
null,
$args,
['currentUser' => new Member()],
['currentUser' => Security::getCurrentUser()],
new ResolveInfo([])
);
};
Expand Down

0 comments on commit f9763bb

Please sign in to comment.