Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing_rhevan #124

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading