Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
phanan committed Aug 5, 2017
1 parent 3fcf152 commit fd368f6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/Feature/MediaTest.php
Expand Up @@ -149,18 +149,21 @@ public function songs_can_be_synced_with_selectively_tags()
/** @test */
public function all_tags_are_catered_for_if_syncing_new_file()
{
// First we sync the test directory to get the data
$media = new Media();
$media->sync($this->mediaPath);

// Now delete the first song.
$song = Song::orderBy('id')->first();
$song->delete();

// Selectively sync only one tag,
// but we still expect the whole song to be added back with all info
// Selectively sync only one tag
$media->sync($this->mediaPath, ['track'], true);

$addedSong = Song::findOrFail($song)->toArray();
array_forget($addedSong, 'created_at');
// but we still expect the whole song to be added back with all info
$addedSong = Song::findOrFail($song->id)->toArray();
$song = $song->toArray();
array_forget($addedSong, 'created_at');
array_forget($song, 'created_at');
$this->assertEquals($song, $addedSong);
}
Expand Down

0 comments on commit fd368f6

Please sign in to comment.