pp-planer/tests/Feature/Migrations/SongsToLabelsRefactorTest.php

22 lines
825 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
test('song_slides has label_id column after migration', function () {
expect(Schema::hasColumn('song_slides', 'label_id'))->toBeTrue();
expect(Schema::hasColumn('song_slides', 'song_group_id'))->toBeFalse();
});
test('song_arrangement_groups table is dropped', function () {
expect(Schema::hasTable('song_arrangement_groups'))->toBeFalse();
});
test('song_arrangement_labels table exists with expected columns', function () {
expect(Schema::hasTable('song_arrangement_labels'))->toBeTrue();
expect(Schema::hasColumns('song_arrangement_labels', ['id', 'song_arrangement_id', 'label_id', 'order', 'created_at', 'updated_at']))->toBeTrue();
});
test('song_groups table is dropped', function () {
expect(Schema::hasTable('song_groups'))->toBeFalse();
});