Skip to content

Commit

Permalink
Merge pull request #124
Browse files Browse the repository at this point in the history
testing_rhevan
  • Loading branch information
GerritPotgieter authored Sep 29, 2024
2 parents 9fabb4c + b16f0d4 commit 6fc6039
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/test/database_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void main() {
var tables = await db.rawQuery(
"SELECT name FROM sqlite_master WHERE type='table' AND name='playlists';");
expect(tables.isNotEmpty, true, reason: 'playlists table should exist');
print("Playlist table does exist");
//print("Playlist table does exist");
});

test('Insert playlist into database', () async {
Expand All @@ -51,7 +51,7 @@ void main() {
'dateCreated': '2024-09-30',
};
int result = await db.insert('playlists', playlist);
print("Playlists inserted into database");
//print("Playlists inserted into database");
expect(result, isNonZero, reason: 'Playlist should be inserted');
});

Expand All @@ -73,7 +73,7 @@ void main() {

// Debugging step: Print out all playlists to verify data
List<Map<String, dynamic>> allPlaylists = await db.query('playlists');
print("All Playlists in DB: $allPlaylists");
//print("All Playlists in DB: $allPlaylists");

// Now query by userId
String testUserId = 'user1';
Expand All @@ -84,7 +84,7 @@ void main() {
);

// Debugging step: Print the result of the query by userId
print("Playlists for userId = $testUserId: $result");
// print("Playlists for userId = $testUserId: $result");

expect(result.isNotEmpty, true, reason: 'Should return playlists for the given user');
});
Expand Down

0 comments on commit 6fc6039

Please sign in to comment.