diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-06-13 01:09:01 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-06-13 01:09:01 +0100 |
commit | 6b453d0f0f50dccd0333d0d6e8cd0246e86d24a9 (patch) | |
tree | 5ca0f7347d41c1a0634123298963f7a8f9795a7d /test/test-mysql.cpp | |
parent | Avoid direct use of runtime_error in PostgreSQL stuff (diff) | |
download | mygrate-6b453d0f0f50dccd0333d0d6e8cd0246e86d24a9.tar.bz2 mygrate-6b453d0f0f50dccd0333d0d6e8cd0246e86d24a9.tar.xz mygrate-6b453d0f0f50dccd0333d0d6e8cd0246e86d24a9.zip |
Create and drop MySQL mock DBs as needed
Diffstat (limited to 'test/test-mysql.cpp')
-rw-r--r-- | test/test-mysql.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test-mysql.cpp b/test/test-mysql.cpp index 954a121..e4551f0 100644 --- a/test/test-mysql.cpp +++ b/test/test-mysql.cpp @@ -65,4 +65,7 @@ BOOST_AUTO_TEST_CASE(stmt) BOOST_AUTO_TEST_CASE(mock) { MyGrate::Testing::MySQLDB db; + auto mdb = db.mock(); + auto rs = MyGrate::DbStmt<"SELECT DATABASE()">::execute(&mdb); + BOOST_CHECK_EQUAL(rs->at(0, 0).get<std::string_view>().substr(0, 13), "mygrate_test_"); } |