update mocha test to use a database for testing, add edit method to books models