-
-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5bd2163
commit 9af1fed
Showing
1 changed file
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,13 +33,13 @@ public function setUp(): void | |
Config::set('statamic.git', $defaultConfig); | ||
Config::set('statamic.git.enabled', true); | ||
|
||
$this->user = User::make() | ||
->id('chewbacca') | ||
->email('[email protected]') | ||
->data(['name' => 'Chewbacca']) | ||
->makeSuper(); | ||
|
||
$this->actingAs($this->user); | ||
$this->actingAs( | ||
$user = User::make() | ||
->id('chewbacca') | ||
->email('[email protected]') | ||
->data(['name' => 'Chewbacca']) | ||
->makeSuper() | ||
); | ||
|
||
Config::set('filesystems.disks.test', [ | ||
'driver' => 'local', | ||
|
@@ -49,13 +49,13 @@ public function setUp(): void | |
Storage::fake('test'); | ||
|
||
Git::shouldReceive('statuses'); | ||
Git::shouldReceive('as')->with($this->user); | ||
Git::shouldReceive('as')->with($user); | ||
} | ||
|
||
/** @test */ | ||
public function it_doesnt_commit_when_git_is_disabled() | ||
{ | ||
Git::shouldReceive('as')->with($this->user)->never(); | ||
Git::shouldReceive('as')->never(); | ||
Git::shouldReceive('dispatchCommit')->with('Collection saved')->never(); | ||
Git::shouldReceive('dispatchCommit')->with('Collection deleted')->never(); | ||
|
||
|
@@ -70,7 +70,7 @@ public function it_doesnt_commit_when_git_is_disabled() | |
/** @test */ | ||
public function it_doesnt_commit_when_automatic_is_disabled() | ||
{ | ||
Git::shouldReceive('as')->with($this->user)->never(); | ||
Git::shouldReceive('as')->never(); | ||
Git::shouldReceive('dispatchCommit')->with('Collection saved')->never(); | ||
Git::shouldReceive('dispatchCommit')->with('Collection deleted')->never(); | ||
|
||
|
@@ -85,7 +85,7 @@ public function it_doesnt_commit_when_automatic_is_disabled() | |
/** @test */ | ||
public function it_doesnt_commit_ignored_events() | ||
{ | ||
Git::shouldReceive('as')->with($this->user)->never(); | ||
Git::shouldReceive('as')->never(); | ||
Git::shouldReceive('dispatchCommit')->with('Collection saved')->never(); | ||
Git::shouldReceive('dispatchCommit')->with('Collection deleted')->once(); | ||
|
||
|
@@ -102,7 +102,7 @@ public function it_doesnt_commit_ignored_events() | |
/** @test */ | ||
public function it_doesnt_commit_when_event_subscriber_is_disabled() | ||
{ | ||
Git::shouldReceive('as')->with($this->user)->never(); | ||
Git::shouldReceive('as')->never(); | ||
Git::shouldReceive('dispatchCommit')->with('Collection saved')->never(); | ||
Git::shouldReceive('dispatchCommit')->with('Collection deleted')->once(); | ||
|
||
|