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

Test added. #79

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Test added. #79

wants to merge 13 commits into from

Conversation

Liangbin
Copy link
Collaborator

Add removeComments() to SQLitehelper.js
Add test for comments operations.

@@ -9,7 +9,7 @@ $ ./runserver <port>
where port is a positive integer > 1023. To run the server on a different
environment, use

$ node js/dispatcher.js <node>
$ node js/dispatcher.js <port>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a note saying you must be in the CourseProject/src directory?

@cngu
Copy link
Collaborator

cngu commented Apr 15, 2011

I think the comment tests should be a little more robust. Testing just one comment isn't very effective.
You should also add your test to the alltests.sh script

removes the comments corresponding to the given taskid if it exists.
*/
module.exports.removeComments = function (commentsTaskid, callback) {
queryGetRows("DELETE FROM user WHERE taskid = ?", callback, [commentsTaskid]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure this only deletes comments? It looks like this is deleting an entire row of the user table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants